From: hno <> Date: Tue, 30 Jan 2001 16:46:46 +0000 (+0000) Subject: Minor cleanup of parse_eol to get rid of leading whitespace X-Git-Tag: SQUID_3_0_PRE1~1627 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20cb98c97fc1bfe00a56d9cd2e0ed3eb9427e1ad;p=thirdparty%2Fsquid.git Minor cleanup of parse_eol to get rid of leading whitespace --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index c813e7f7c4..0eef05ef42 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.372 2001/01/28 00:45:45 hno Exp $ + * $Id: cache_cf.cc,v 1.373 2001/01/30 09:46:46 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1699,9 +1699,13 @@ free_string(char **var) void parse_eol(char *volatile *var) { - char *token = strtok(NULL, null_string); + unsigned char *token = strtok(NULL, null_string); safe_free(*var); if (token == NULL) + self_destruct(); + while(*token && isspace(*token)) + token++; + if (!*token) self_destruct(); *var = xstrdup(token); }