From: Emeric Brun Date: Mon, 4 Jan 2010 13:54:38 +0000 (+0100) Subject: [BUILD] warning ultoa_r returns char * X-Git-Tag: v1.4-dev6~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a7fce53831d5d4a5493c6dd7c061ff8a8b9da48;p=thirdparty%2Fhaproxy.git [BUILD] warning ultoa_r returns char * ultoa_r modifies its output, it returns a char *. --- diff --git a/include/common/standard.h b/include/common/standard.h index ce3c6b85b0..4dd622ac4b 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -55,7 +55,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) { diff --git a/src/standard.c b/src/standard.c index aab318bb36..6ae4dd7842 100644 --- a/src/standard.c +++ b/src/standard.c @@ -57,7 +57,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;