[MINOR] standard: change arg type from const char* to char*

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.
This commit is contained in:
Willy Tarreau 2010-10-15 23:21:42 +02:00
parent 4ec83cd939
commit 74172757c7
2 changed files with 3 additions and 3 deletions

View 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); extern unsigned int read_uint(const char **s, const char *end);
unsigned int inetaddr_host(const char *text); unsigned int inetaddr_host(const char *text);
unsigned int inetaddr_host_lim(const char *text, const char *stop); 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) { static inline char *cut_crlf(char *s) {

View 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 * Idem except the pointer to first unparsed byte is returned into <ret> which
* must not be NULL. * 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'; const unsigned int ascii_zero = ('0' << 24) | ('0' << 16) | ('0' << 8) | '0';
register unsigned int dig100, dig10, dig1; register unsigned int dig100, dig10, dig1;
int s; int s;
const char *p, *d; char *p, *d;
dig1 = dig10 = dig100 = ascii_zero; dig1 = dig10 = dig100 = ascii_zero;
s = 24; s = 24;