From: Amos Jeffries Date: Mon, 29 Jul 2013 17:34:48 +0000 (-0600) Subject: Fix 'ERROR: A percentage value is missing.' X-Git-Tag: SQUID_3_5_0_1~678 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=223d18cd2295aedcb0f8dd79cd085ce2e1ae25de;p=thirdparty%2Fsquid.git Fix 'ERROR: A percentage value is missing.' This usage of strtok() appears to have been omitted from rev.12949 --- diff --git a/src/Parsing.cc b/src/Parsing.cc index 267ed67756..22ea60152a 100644 --- a/src/Parsing.cc +++ b/src/Parsing.cc @@ -189,8 +189,7 @@ GetInteger(void) int GetPercentage(void) { - int p; - char *token = strtok(NULL, w_space); + char *token = ConfigParser::NextToken(); if (!token) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: A percentage value is missing."); @@ -203,7 +202,7 @@ GetPercentage(void) *end = '\0'; } - p = xatoi(token); + int p = xatoi(token); if (p < 0 || p > 100) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: The value '" << token << "' is out of range. A percentage should be within [0, 100].");