aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-03-14 10:50:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-03-14 10:51:25 +0100
commit4ef6d6b1bc8c4345f81531274492f188c8e99976 (patch)
tree84ef422869caa1518f0ef7ade63e515d91243d0d /src
parent2ad3cf2fba65fb54931371441a712eccb274188c (diff)
curl: glob_range: no need to check unsigned variable for negative
cppcheck warned: [src/tool_urlglob.c:283]: (style) Checking if unsigned variable 'step_n' is less than zero.
Diffstat (limited to 'src')
-rw-r--r--src/tool_urlglob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index f1dd27fad..70d17fed1 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -279,8 +279,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
*posp += (pattern - *patternp);
- if(!endp || (min_n > max_n) || (step_n > (max_n - min_n)) ||
- (step_n <= 0) )
+ if(!endp || (min_n > max_n) || (step_n > (max_n - min_n)) || !step_n)
/* the pattern is not well-formed */
return GLOBERROR("bad range", *posp, CURLE_URL_MALFORMAT);