diff --git a/include/util.h b/include/util.h index f9f5c4e58..118988d0d 100644 --- a/include/util.h +++ b/include/util.h @@ -76,7 +76,7 @@ void halt(void) NORETURN; void memzero(void *s, unsigned long n); void *memset(void *s, unsigned long c, unsigned long n); void *memcpy(void* ptr_dst, const void* ptr_src, unsigned long n); -int strncmp(const char *s1, const char *s2, int n); +int PURE strncmp(const char *s1, const char *s2, int n); long CONST char_to_long(char c); long PURE str_to_long(const char* str); diff --git a/src/util.c b/src/util.c index 269111fe9..bbc8bf47f 100644 --- a/src/util.c +++ b/src/util.c @@ -79,7 +79,7 @@ memcpy(void* ptr_dst, const void* ptr_src, unsigned long n) return ptr_dst; } -int +int PURE strncmp(const char* s1, const char* s2, int n) { word_t i;