summaryrefslogtreecommitdiff
path: root/stats.c
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-01-02 19:41:17 +0100
committerJoel Rosdahl <joel@rosdahl.net>2016-01-02 19:41:17 +0100
commit8ef5d30ab82a8287aab1ff216cfc94118cbec896 (patch)
tree6e57048ba0af573e2c34dd8aed75f28f31a3c60c /stats.c
parentba39741ab39d1733776700b78c2e522009baca18 (diff)
downloadccache-8ef5d30ab82a8287aab1ff216cfc94118cbec896.tar.gz
Fix cppcheck warnings/suggestions
Diffstat (limited to 'stats.c')
-rw-r--r--stats.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stats.c b/stats.c
index 2d35ec9e..5f217657 100644
--- a/stats.c
+++ b/stats.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2004 Andrew Tridgell
- * Copyright (C) 2009-2015 Joel Rosdahl
+ * Copyright (C) 2009-2016 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -110,11 +110,10 @@ parse_stats(struct counters *counters, const char *buf)
size_t i = 0;
const char *p;
char *p2;
- long val;
p = buf;
while (true) {
- val = strtol(p, &p2, 10);
+ long val = strtol(p, &p2, 10);
if (p2 == p) {
break;
}