diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-12-20 13:29:00 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-20 23:51:47 +0100 |
commit | be1ce42e936c96776b661ba5a93b0c9d0d76bb31 (patch) | |
tree | acbb27da29a312d03fbed7cce1f2069c44cfcfd9 /include | |
parent | 2b33e316ac0d14b564ade0dd6fc3be136e945926 (diff) |
Mark pure functions with attribute pure
Diffstat (limited to 'include')
-rw-r--r-- | include/string.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/string.h b/include/string.h index c77d387..c31b429 100644 --- a/include/string.h +++ b/include/string.h @@ -32,7 +32,7 @@ extern void *memcpy (void *dest, const void *src, size_t n); extern void *memmove (void *dest, const void *src, size_t n); -extern int memcmp (const void *s1, const void *s2, size_t n); +extern int memcmp (const void *s1, const void *s2, size_t n) __attribute__ ((pure)); extern void *memset (void *s, int c, size_t n); @@ -46,11 +46,11 @@ extern char *strrchr (const char *s, int c); extern char *strsep (char **strp, const char *delim); -extern int strcmp (const char *s1, const char *s2); +extern int strcmp (const char *s1, const char *s2) __attribute__ ((pure)); -extern int strncmp (const char *s1, const char *s2, size_t n); +extern int strncmp (const char *s1, const char *s2, size_t n) __attribute__ ((pure)); -extern size_t strlen (const char *s); +extern size_t strlen (const char *s) __attribute__ ((pure)); extern char *strstr(const char *haystack, const char *needle); |