about summary refs log tree commit diff homepage
path: root/runtime/klee-libc/strcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/klee-libc/strcmp.c')
-rw-r--r--runtime/klee-libc/strcmp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/klee-libc/strcmp.c b/runtime/klee-libc/strcmp.c
new file mode 100644
index 00000000..6b8c4e85
--- /dev/null
+++ b/runtime/klee-libc/strcmp.c
@@ -0,0 +1,14 @@
+//===-- strcmp.c ----------------------------------------------------------===//
+//
+//                     The KLEE Symbolic Virtual Machine
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int strcmp(const char *a, const char *b) {
+  while (*a && *a == *b)
+    ++a, ++b;
+  return *a - *b;
+}