diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2016-05-28 10:43:22 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2016-05-28 10:43:22 +0100 |
commit | 039e8c5ee8b5e23e6031e241ddf202d2a12db3b7 (patch) | |
tree | d6888931de443ee3abbac3835fd70589649a6cfe | |
parent | 2f8fdc5cfb979b4a301b80b2a2323ab1f8373152 (diff) | |
download | klee-039e8c5ee8b5e23e6031e241ddf202d2a12db3b7.tar.gz |
Fixed an incorrect read() invocation and missing includes for FD_Fail2.c
-rw-r--r-- | test/Runtime/POSIX/FD_Fail2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Runtime/POSIX/FD_Fail2.c b/test/Runtime/POSIX/FD_Fail2.c index c2e5596b..9d7e358f 100644 --- a/test/Runtime/POSIX/FD_Fail2.c +++ b/test/Runtime/POSIX/FD_Fail2.c @@ -18,7 +18,8 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <stdio.h> +#include <string.h> +#include <unistd.h> int main(int argc, char** argv) { char buf[1024]; @@ -28,7 +29,7 @@ int main(int argc, char** argv) { int r; - r = read(fd, buf, 1, 5); + r = read(fd, buf, 5); if (r != -1) printf("read() succeeded %u\n", fd); else printf("read() failed with error '%s'\n", strerror(errno)); |