OSDN Git Service

loop: don't infloop
authorJim Meyering <meyering@redhat.com>
Fri, 18 Sep 2009 13:30:07 +0000 (15:30 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 18 Sep 2009 15:01:07 +0000 (17:01 +0200)
commit389bd98b434e88e753957f2e33e2f22a1687682a
tree64b1bebe237ad4af1f2123e71a9180c18c2fd2c4
parent96bb50a3b13b4d855cc472572a9360f4b2f2df48
loop: don't infloop

Correct a bug introduced in commit 52815877, 2007-06-15,
"Make loop_probe and loop_clobber work with sector_size > 512, too."
* libparted/labels/loop.c (loop_clobber): Initialize "i" before
the loop, not inside it.
* tests/t0400-loop-clobber-infloop.sh: Test for this.
* tests/Makefile.am (TESTS): Add it.
libparted/labels/loop.c
tests/Makefile.am
tests/t0400-loop-clobber-infloop.sh [new file with mode: 0644]