]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Remove unused xstrtoul() from the global scope (#1407)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Wed, 5 Jul 2023 21:30:14 +0000 (21:30 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 25 Jul 2023 14:59:56 +0000 (02:59 +1200)
xstrtoul() is only used by xstrtoui() in the same module, no need to
export it to the global namespace

compat/xstrto.cc
compat/xstrto.h

index 3cee80ab3216b06504c52cb12a6bce1883588448..fff59daaa49dbc2d4cb68abffbe2ef213bbcc4eb 100644 (file)
@@ -57,7 +57,7 @@
 
 #include <cerrno>
 
-bool
+static bool
 xstrtoul(const char *s, char **end, unsigned long *value,
          unsigned long min, unsigned long max)
 {
index 218c75cdb57d26a8fe3104ae6190d1600a0c958e..105b4a3cfa858dcb9bceacd9f8073bf21c9caa86 100644 (file)
@@ -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);