diff --git a/src/util/base36.c b/src/util/base36.c index ef7c38371..3ded21a54 100644 --- a/src/util/base36.c +++ b/src/util/base36.c @@ -55,7 +55,6 @@ int atoi36(const char *str) const char *itoab_r(int i, int base, char *s, size_t len) { char *dst; - static int index = 0; /* STATIC_XCALL: used across calls */ assert(len > 2); dst = s + len - 2; diff --git a/src/util/bsdstring.c b/src/util/bsdstring.c index 4aa779495..f59b0ddaa 100644 --- a/src/util/bsdstring.c +++ b/src/util/bsdstring.c @@ -35,8 +35,6 @@ int wrptr(char **ptr, size_t * size, int result) return ERANGE; } -#ifndef HAVE_STRLCPY -#define HAVE_STRLCPY size_t strlcpy(char *dst, const char *src, size_t siz) { /* copied from OpenBSD source code */ register char *d = dst; @@ -61,7 +59,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz) return (s - src - 1); /* count does not include NUL */ } -#endif char * strlcpy_w(char *dst, const char *src, size_t *siz, const char *err, const char *file, int line) { @@ -78,8 +75,6 @@ char * strlcpy_w(char *dst, const char *src, size_t *siz, const char *err, const return buf; } -#ifndef HAVE_STRLCAT -#define HAVE_STRLCAT size_t strlcat(char *dst, const char *src, size_t siz) { register char *d = dst; @@ -106,10 +101,7 @@ size_t strlcat(char *dst, const char *src, size_t siz) return (dlen + (s - src)); /* count does not include NUL */ } -#endif -#ifndef HAVE_SLPRINTF -#define HAVE_SLPRINTF size_t slprintf(char * dst, size_t size, const char * format, ...) { va_list args; @@ -125,4 +117,3 @@ size_t slprintf(char * dst, size_t size, const char * format, ...) return (size_t)result; } -#endif diff --git a/src/util/bsdstring.h b/src/util/bsdstring.h index 583d176f3..923cf60d8 100644 --- a/src/util/bsdstring.h +++ b/src/util/bsdstring.h @@ -9,7 +9,7 @@ int wrptr(char **ptr, size_t * size, int bytes); #undef HAVE_SLPRINTF #ifdef HAVE_BSDSTRING #define HAVE_STRLCAT -#define HAVE_SLPRINT +#define HAVE_SLPRINTF #define HAVE_STRLCPY #else #include