From: Rob Landley Date: Sun, 22 Jan 2006 23:17:18 +0000 (-0000) Subject: Close bug 644: loop incrementing twice, skipping ever other device. X-Git-Tag: 1_1_0~323 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b70ccd9509ff4b49b4369b5ebda14bc9632036c8;p=oweals%2Fbusybox.git Close bug 644: loop incrementing twice, skipping ever other device. --- diff --git a/libbb/loop.c b/libbb/loop.c index 85aa37236..6c3144a77 100644 --- a/libbb/loop.c +++ b/libbb/loop.c @@ -98,7 +98,7 @@ int set_loop(char **device, const char *file, int offset) /* Find a loop device. */ try=*device ? : dev; for(i=0;rc;i++) { - sprintf(dev, LOOP_FORMAT, i++); + sprintf(dev, LOOP_FORMAT, i); /* Ran out of block devices, return failure. */ if(stat(try, &statbuf) || !S_ISBLK(statbuf.st_mode)) { rc=ENOENT;