about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2013-09-18 06:04:30 -0700
committerCristian Cadar <c.cadar@imperial.ac.uk>2013-09-18 06:04:30 -0700
commitb913be09fa192d587e3006d83ad2f5d0e69f7e20 (patch)
treea06405c60137ce73b43da7ef3fb4304cfa9ba619
parentba2f5b961877f7cdb98a98600e4db591078c5f12 (diff)
parenta9bad13dd6000b431c8ef917515c1f33e2d67a05 (diff)
downloadklee-b913be09fa192d587e3006d83ad2f5d0e69f7e20.tar.gz
Merge pull request #23 from MartinNowack/fix_putchar
Fix implementation for putchar
-rw-r--r--runtime/klee-libc/putchar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/klee-libc/putchar.c b/runtime/klee-libc/putchar.c
index 4c3a57e4..497402a6 100644
--- a/runtime/klee-libc/putchar.c
+++ b/runtime/klee-libc/putchar.c
@@ -15,6 +15,7 @@
 
 int putchar(int c) {
   char x = c;
-  write(1, &x, 1);
-  return 1;
+  if (1 == write(1, &x, 1))
+    return c;
+  return EOF;
 }