]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] standard: change arg type from const char* to char*
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Oct 2010 21:21:42 +0000 (23:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:37 +0000 (19:04 +0200)
inetaddr_host_lim_ret() used to make use of const char** for some
args, but that make it impossible ot use char** due to the way
controls are made by gcc. So let's change that.

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

index 71c5b768129e39c08c5f44ebca53fbde118dfcef..bdb6ec0fba0332928b780b0e513435908a57fff7 100644 (file)
@@ -303,7 +303,7 @@ extern int strl2llrc(const char *s, int len, long long *ret);
 extern unsigned int read_uint(const char **s, const char *end);
 unsigned int inetaddr_host(const char *text);
 unsigned int inetaddr_host_lim(const char *text, const char *stop);
-unsigned int inetaddr_host_lim_ret(const char *text, char *stop, const char **ret);
+unsigned int inetaddr_host_lim_ret(char *text, char *stop, char **ret);
 
 static inline char *cut_crlf(char *s) {
 
index 017f87fd9ce206b75fd5097e015b440ef156ca2e..60f5af1f5d5e5c53d199a9e99a8dba7a562fda4d 100644 (file)
@@ -964,12 +964,12 @@ unsigned int inetaddr_host_lim(const char *text, const char *stop)
  * Idem except the pointer to first unparsed byte is returned into <ret> which
  * must not be NULL.
  */
-unsigned int inetaddr_host_lim_ret(const char *text, char *stop, const char **ret)
+unsigned int inetaddr_host_lim_ret(char *text, char *stop, char **ret)
 {
        const unsigned int ascii_zero = ('0' << 24) | ('0' << 16) | ('0' << 8) | '0';
        register unsigned int dig100, dig10, dig1;
        int s;
-       const char *p, *d;
+       char *p, *d;
 
        dig1 = dig10 = dig100 = ascii_zero;
        s = 24;