aboutsummaryrefslogtreecommitdiff
path: root/toys/other/pmap.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-02-16 11:09:23 -0600
committerRob Landley <rob@landley.net>2014-02-16 11:09:23 -0600
commit1fb3ae7075ab9d198b757f7da5cc9c748abc3574 (patch)
tree883cbdd98ecc483f6a5a948b1709e878de5bbdca /toys/other/pmap.c
parent33b022d873abc5255e22bf70687e5c0a260fb107 (diff)
downloadtoybox-1fb3ae7075ab9d198b757f7da5cc9c748abc3574.tar.gz
Various cleanups found by Tom Sparrow's static analysis.
Diffstat (limited to 'toys/other/pmap.c')
-rw-r--r--toys/other/pmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/pmap.c b/toys/other/pmap.c
index 9ef1ade9..ab0b61cd 100644
--- a/toys/other/pmap.c
+++ b/toys/other/pmap.c
@@ -34,7 +34,7 @@ void pmap_main(void)
size_t len;
long long start, end, pss, tpss = 0, dirty, tdirty = 0, swap, tswap = 0,
total = 0;
- int count, xx = 0;
+ int xx = 0;
snprintf(toybuf, sizeof(toybuf), "/proc/%u/cmdline", pid);
line = readfile(toybuf, 0, 0);
@@ -57,7 +57,7 @@ void pmap_main(void)
// Loop through mappings
for (;;) {
- int off;
+ int off, count;
line = 0;
if (0 >= getline(&line, &len, fp)) break;