The number of files successfully renamed is calculated and stored in variable ct, but actually the variable is not used afterwards. Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx> --- misc-utils/rename.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc-utils/rename.c b/misc-utils/rename.c index fd232c9..87262b8 100644 --- a/misc-utils/rename.c +++ b/misc-utils/rename.c @@ -64,7 +64,7 @@ do_rename(char *from, char *to, char *s) { int main(int argc, char **argv) { char *from, *to, *p; - int i, ct; + int i; progname = argv[0]; if ((p = strrchr(progname, '/')) != NULL) @@ -90,8 +90,7 @@ main(int argc, char **argv) { from = argv[1]; to = argv[2]; - ct = 0; for (i=3; i<argc; i++) - ct += do_rename(from, to, argv[i]); + do_rename(from, to, argv[i]); return 0; } --- - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html