diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2023-10-12 10:34:01 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2024-02-08 13:17:19 +0000 |
commit | db6381e1c3e1633b7e3a0adc50aea3fa553e18e4 (patch) | |
tree | 4db24d84331b8b08637fc103e81580b5fbce62ea /runtime | |
parent | ef4b8d817181f42d99a2c9664367d60fc3a74c05 (diff) | |
download | klee-db6381e1c3e1633b7e3a0adc50aea3fa553e18e4.tar.gz |
Fix `klee-libc/memchr.c` compiler warning
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/klee-libc/memchr.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/runtime/klee-libc/memchr.c b/runtime/klee-libc/memchr.c index fe0670a7..3cd47cdf 100644 --- a/runtime/klee-libc/memchr.c +++ b/runtime/klee-libc/memchr.c @@ -36,19 +36,14 @@ #include <string.h> -void * -memchr(s, c, n) - const void *s; - int c; - size_t n; -{ - if (n != 0) { - const unsigned char *p = s; +void *memchr(const void *s, int c, size_t n) { + if (n != 0) { + const unsigned char *p = s; - do { - if (*p++ == c) - return ((void *)(p - 1)); - } while (--n != 0); - } - return (NULL); + do { + if (*p++ == c) + return ((void *)(p - 1)); + } while (--n != 0); + } + return (NULL); } |