aboutsummaryrefslogtreecommitdiff
path: root/src/lib/string
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-07-03 12:33:09 +0300
committerrl1987 <rl1987@sdf.lonestar.org>2018-07-03 12:33:09 +0300
commitfedb3e46ec39e2e980eb1ae25138e9e0b310d084 (patch)
tree67afd8e9fb365c4ca4bc8fd62ba0a3f60ac2ac39 /src/lib/string
parenta9628c0c0b2cc5c0286c4e49591b3b18dc054e87 (diff)
downloadtor-fedb3e46ec39e2e980eb1ae25138e9e0b310d084.tar.gz
tor-fedb3e46ec39e2e980eb1ae25138e9e0b310d084.zip
Remove ATTR_NONNULL macro
Diffstat (limited to 'src/lib/string')
-rw-r--r--src/lib/string/compat_string.h4
-rw-r--r--src/lib/string/printf.h4
-rw-r--r--src/lib/string/util_string.h24
3 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/string/compat_string.h b/src/lib/string/compat_string.h
index 0a4ce01755..34490bce07 100644
--- a/src/lib/string/compat_string.h
+++ b/src/lib/string/compat_string.h
@@ -41,10 +41,10 @@ static inline int strcasecmp(const char *a, const char *b, size_t n) {
#endif /* defined __APPLE__ */
#ifndef HAVE_STRLCAT
-size_t strlcat(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2));
+size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_STRLCPY
-size_t strlcpy(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2));
+size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
char *tor_strtok_r_impl(char *str, const char *sep, char **lasts);
diff --git a/src/lib/string/printf.h b/src/lib/string/printf.h
index 2f46206545..69b724379a 100644
--- a/src/lib/string/printf.h
+++ b/src/lib/string/printf.h
@@ -13,9 +13,9 @@
#include <stddef.h>
int tor_snprintf(char *str, size_t size, const char *format, ...)
- CHECK_PRINTF(3,4) ATTR_NONNULL((1,3));
+ CHECK_PRINTF(3,4);
int tor_vsnprintf(char *str, size_t size, const char *format, va_list args)
- CHECK_PRINTF(3,0) ATTR_NONNULL((1,3));
+ CHECK_PRINTF(3,0);
int tor_asprintf(char **strp, const char *fmt, ...)
CHECK_PRINTF(2,3);
diff --git a/src/lib/string/util_string.h b/src/lib/string/util_string.h
index bdc2e77cea..75407d5ffa 100644
--- a/src/lib/string/util_string.h
+++ b/src/lib/string/util_string.h
@@ -12,29 +12,29 @@
#include <stddef.h>
const void *tor_memmem(const void *haystack, size_t hlen, const void *needle,
- size_t nlen) ATTR_NONNULL((1,3));
+ size_t nlen);
const void *tor_memstr(const void *haystack, size_t hlen,
- const char *needle) ATTR_NONNULL((1,3));
+ const char *needle);
int tor_mem_is_zero(const char *mem, size_t len);
int tor_digest_is_zero(const char *digest);
int tor_digest256_is_zero(const char *digest);
/** Allowable characters in a hexadecimal string. */
#define HEX_CHARACTERS "0123456789ABCDEFabcdef"
-void tor_strlower(char *s) ATTR_NONNULL((1));
-void tor_strupper(char *s) ATTR_NONNULL((1));
-int tor_strisprint(const char *s) ATTR_NONNULL((1));
-int tor_strisnonupper(const char *s) ATTR_NONNULL((1));
+void tor_strlower(char *s);
+void tor_strupper(char *s);
+int tor_strisprint(const char *s);
+int tor_strisnonupper(const char *s);
int tor_strisspace(const char *s);
int strcmp_opt(const char *s1, const char *s2);
-int strcmpstart(const char *s1, const char *s2) ATTR_NONNULL((1,2));
-int strcmp_len(const char *s1, const char *s2, size_t len) ATTR_NONNULL((1,2));
-int strcasecmpstart(const char *s1, const char *s2) ATTR_NONNULL((1,2));
-int strcmpend(const char *s1, const char *s2) ATTR_NONNULL((1,2));
-int strcasecmpend(const char *s1, const char *s2) ATTR_NONNULL((1,2));
+int strcmpstart(const char *s1, const char *s2);
+int strcmp_len(const char *s1, const char *s2, size_t len);
+int strcasecmpstart(const char *s1, const char *s2);
+int strcmpend(const char *s1, const char *s2);
+int strcasecmpend(const char *s1, const char *s2);
int fast_memcmpstart(const void *mem, size_t memlen, const char *prefix);
-void tor_strstrip(char *s, const char *strip) ATTR_NONNULL((1,2));
+void tor_strstrip(char *s, const char *strip);
const char *eat_whitespace(const char *s);
const char *eat_whitespace_eos(const char *s, const char *eos);