From db6381e1c3e1633b7e3a0adc50aea3fa553e18e4 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Thu, 12 Oct 2023 10:34:01 +0100 Subject: Fix `klee-libc/memchr.c` compiler warning --- runtime/klee-libc/memchr.c | 23 +++++++++-------------- 1 file 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 -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); } -- cgit 1.4.1