diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-08-24 16:34:22 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-08-24 16:34:22 +0000 |
commit | 79d40a536ad23e514a45746e611429a3bd5f6df3 (patch) | |
tree | a554d34a3ab106a9627ec7755e30ea90d6498578 /src | |
parent | 35196f7d8eff8bb86136aa89fba76da036c62ecf (diff) | |
download | tinyproxy-79d40a536ad23e514a45746e611429a3bd5f6df3.tar.gz tinyproxy-79d40a536ad23e514a45746e611429a3bd5f6df3.zip |
(get_bool_arg): Moved the initialization of "p" _before_ the assert()
calls. The code doesn't compile under gcc 2.95 otherwise. (I'm
surprised it compiles under gcc 3.3 without a problem.)
Diffstat (limited to '')
-rw-r--r-- | src/conffile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conffile.c b/src/conffile.c index 7b1430f..54c5c50 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -1,4 +1,4 @@ -/* $Id: conffile.c,v 1.3 2004-08-14 03:18:41 rjkaes Exp $ +/* $Id: conffile.c,v 1.4 2004-08-24 16:34:22 rjkaes Exp $ * * Parses the configuration file and sets up the config_s structure for * use by the application. This file replaces the old grammar.y and @@ -323,11 +323,11 @@ set_string_arg(char** var, const char* line, regmatch_t* match) static int get_bool_arg(const char* line, regmatch_t* match) { + const char* p = line + match->rm_so; + assert(line); assert(match && match->rm_so != -1); - const char* p = line + match->rm_so; - /* "y"es or o"n" map as true, otherwise it's false. */ if (tolower(p[0]) == 'y' || tolower(p[1]) == 'n') return 1; |