From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Wed, 5 Jul 2023 21:30:14 +0000 (+0000) Subject: Maintenance: Remove unused xstrtoul() from the global scope (#1407) X-Git-Tag: SQUID_6_2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b525053f9fabcb037d391ffaa22a870d1bfc11dd;p=thirdparty%2Fsquid.git Maintenance: Remove unused xstrtoul() from the global scope (#1407) xstrtoul() is only used by xstrtoui() in the same module, no need to export it to the global namespace --- diff --git a/compat/xstrto.cc b/compat/xstrto.cc index 3cee80ab32..fff59daaa4 100644 --- a/compat/xstrto.cc +++ b/compat/xstrto.cc @@ -57,7 +57,7 @@ #include -bool +static bool xstrtoul(const char *s, char **end, unsigned long *value, unsigned long min, unsigned long max) { diff --git a/compat/xstrto.h b/compat/xstrto.h index 218c75cdb5..105b4a3cfa 100644 --- a/compat/xstrto.h +++ b/compat/xstrto.h @@ -9,11 +9,11 @@ #ifndef _SQUID_XSTRTO_H #define _SQUID_XSTRTO_H -// these functions are not used by the remaining Squid C code. +// this function is not used by the remaining Squid C code #if defined(__cplusplus) /** - * xstrtou{i,l} - string to number conversion + * Convert a c-string (or its prefix) into an unsigned integer. * \param s input string * \param end like strtoul's "end" pointer * \param value pointer for result. Undefined on failure @@ -28,9 +28,6 @@ * \return true/false whether number was accepted. On failure, *value has * undefined contents. */ -bool xstrtoul(const char *s, char **end, unsigned long *value, - unsigned long min, unsigned long max); - bool xstrtoui(const char *s, char **end, unsigned int *value, unsigned int min, unsigned int max);