From: Jim Meyering Date: Mon, 17 May 2004 12:34:36 +0000 (+0000) Subject: (incname): Decrement `len' only once per loop iteration. X-Git-Tag: v5.3.0~1533 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee47cc09f6ed2acf17c90663acb92b5a468bdf9f;p=thirdparty%2Fcoreutils.git (incname): Decrement `len' only once per loop iteration. --- diff --git a/src/shred.c b/src/shred.c index d6041ee355..4d51a4b32b 100644 --- a/src/shred.c +++ b/src/shred.c @@ -1361,7 +1361,7 @@ incname (char *name, size_t len) { while (len--) { - char const *p = strchr (nameset, name[--len]); + char const *p = strchr (nameset, name[len]); /* If this character has a successor, use it. */ if (p[1])