diff options
author | Denys Vlasenko | 2013-11-29 16:43:33 +0100 |
---|---|---|
committer | Denys Vlasenko | 2013-11-29 16:43:33 +0100 |
commit | 9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (patch) | |
tree | a950fa73740d345e11ba1ce90f4fc39ee12516e6 /e2fsprogs/old_e2fsprogs/blkid | |
parent | 1a7256ac38284caffd2a0de2250364369059be69 (diff) | |
download | busybox-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.zip busybox-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.tar.gz |
fix assorted unused code and wrong format specs found by cppchekc (bug 6716)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs/old_e2fsprogs/blkid')
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/blkidP.h | 4 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/cache.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/dev.c | 4 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/read.c | 2 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/tag.c | 6 |
5 files changed, 7 insertions, 11 deletions
diff --git a/e2fsprogs/old_e2fsprogs/blkid/blkidP.h b/e2fsprogs/old_e2fsprogs/blkid/blkidP.h index d6b2b42..bbadc8e 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/blkidP.h +++ b/e2fsprogs/old_e2fsprogs/blkid/blkidP.h @@ -179,8 +179,4 @@ extern int blkid_set_tag(blkid_dev dev, const char *name, extern blkid_dev blkid_new_dev(void); extern void blkid_free_dev(blkid_dev dev); -#ifdef __cplusplus -} -#endif - #endif diff --git a/e2fsprogs/old_e2fsprogs/blkid/cache.c b/e2fsprogs/old_e2fsprogs/blkid/cache.c index d1d2914..251e499 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/cache.c +++ b/e2fsprogs/old_e2fsprogs/blkid/cache.c @@ -115,7 +115,7 @@ int main(int argc, char** argv) argv[0], ret); exit(1); } - if ((ret = blkid_probe_all(cache) < 0)) + if ((ret = blkid_probe_all(cache)) < 0) fprintf(stderr, "error probing devices\n"); blkid_put_cache(cache); diff --git a/e2fsprogs/old_e2fsprogs/blkid/dev.c b/e2fsprogs/old_e2fsprogs/blkid/dev.c index bb0cc91..260e49c 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/dev.c +++ b/e2fsprogs/old_e2fsprogs/blkid/dev.c @@ -153,7 +153,7 @@ extern int optind; void usage(char *prog) { fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog); - fprintf(stderr, "\tList all devices and exit\n", prog); + fprintf(stderr, "\tList all devices and exit\n"); exit(1); } @@ -176,7 +176,7 @@ int main(int argc, char **argv) case 'm': blkid_debug_mask = strtoul (optarg, &tmp, 0); if (*tmp) { - fprintf(stderr, "Invalid debug mask: %d\n", + fprintf(stderr, "Invalid debug mask: %s\n", optarg); exit(1); } diff --git a/e2fsprogs/old_e2fsprogs/blkid/read.c b/e2fsprogs/old_e2fsprogs/blkid/read.c index f795a5d..feeda51 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/read.c +++ b/e2fsprogs/old_e2fsprogs/blkid/read.c @@ -385,7 +385,7 @@ void blkid_read_cache(blkid_cache cache) continue; end = strlen(buf) - 1; /* Continue reading next line if it ends with a backslash */ - while (buf[end] == '\\' && end < sizeof(buf) - 2 && + while (end < sizeof(buf) - 2 && buf[end] == '\\' && fgets(buf + end, sizeof(buf) - end, file)) { end = strlen(buf) - 1; lineno++; diff --git a/e2fsprogs/old_e2fsprogs/blkid/tag.c b/e2fsprogs/old_e2fsprogs/blkid/tag.c index 8337b46..7424ede 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/tag.c +++ b/e2fsprogs/old_e2fsprogs/blkid/tag.c @@ -356,7 +356,7 @@ void usage(char *prog) fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device " "[type value]\n", prog); - fprintf(stderr, "\tList all tags for a device and exit\n", prog); + fprintf(stderr, "\tList all tags for a device and exit\n"); exit(1); } @@ -382,7 +382,7 @@ int main(int argc, char **argv) case 'm': blkid_debug_mask = strtoul (optarg, &tmp, 0); if (*tmp) { - fprintf(stderr, "Invalid debug mask: %d\n", + fprintf(stderr, "Invalid debug mask: %s\n", optarg); exit(1); } @@ -407,7 +407,7 @@ int main(int argc, char **argv) dev = blkid_get_dev(cache, devname, flags); if (!dev) { - fprintf(stderr, "%s: cannot find device in blkid cache\n"); + fprintf(stderr, "%s: cannot find device in blkid cache\n", devname); exit(1); } if (search_type) { |