]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(incname): Decrement `len' only once per loop iteration.
authorJim Meyering <jim@meyering.net>
Mon, 17 May 2004 12:34:36 +0000 (12:34 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 17 May 2004 12:34:36 +0000 (12:34 +0000)
src/shred.c

index d6041ee35578c6694a97f2522f67e547161cd2ed..4d51a4b32be600945ccb3ba50a21a9a6daf4286e 100644 (file)
@@ -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])