about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2016-05-28 10:43:22 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2016-05-28 10:43:22 +0100
commit039e8c5ee8b5e23e6031e241ddf202d2a12db3b7 (patch)
treed6888931de443ee3abbac3835fd70589649a6cfe /test
parent2f8fdc5cfb979b4a301b80b2a2323ab1f8373152 (diff)
downloadklee-039e8c5ee8b5e23e6031e241ddf202d2a12db3b7.tar.gz
Fixed an incorrect read() invocation and missing includes for FD_Fail2.c
Diffstat (limited to 'test')
-rw-r--r--test/Runtime/POSIX/FD_Fail2.c5
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));