]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] warning ultoa_r returns char *
authorEmeric Brun <ebrun@exceliance.fr>
Mon, 4 Jan 2010 13:54:38 +0000 (14:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Jan 2010 22:16:36 +0000 (23:16 +0100)
ultoa_r modifies its output, it returns a char *.
(cherry picked from commit 3a7fce53831d5d4a5493c6dd7c061ff8a8b9da48)

include/common/standard.h
src/standard.c

index c1e29ae70e2923fe5ebf0b63e431852665dcae77..c984fa6e7880947b46b8e950ed05bbf692534b04 100644 (file)
@@ -79,7 +79,7 @@ extern int strlcpy2(char *dst, const char *src, int size);
  * the ascii representation for number 'n' in decimal.
  */
 extern char itoa_str[][171];
-extern const char *ultoa_r(unsigned long n, char *buffer, int size);
+extern char *ultoa_r(unsigned long n, char *buffer, int size);
 extern const char *ulltoh_r(unsigned long long n, char *buffer, int size);
 static inline const char *ultoa(unsigned long n)
 {
index eecc36069b764308f9fc9673f88e20f175b5fd2b..50f90c226d847cde6c6fba4bac2c3e7e6ecf72b3 100644 (file)
@@ -56,7 +56,7 @@ int strlcpy2(char *dst, const char *src, int size)
  * This function simply returns a locally allocated string containing
  * the ascii representation for number 'n' in decimal.
  */
-const char *ultoa_r(unsigned long n, char *buffer, int size)
+char *ultoa_r(unsigned long n, char *buffer, int size)
 {
        char *pos;