From 79a953842a11abbc4d4cb3b66f0782afe5e67eea Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 8 Aug 2013 00:02:22 -0600 Subject: [PATCH] Fix 'ERROR: A percentage value is missing.' This usage of strtok() appears to have been omitted from rev.12949 --- src/Parsing.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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]."); -- 2.47.2