wipefs: make do_wipe() more readable [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
23b4715b8d
commit
05ba8c8483
|
@ -314,7 +314,7 @@ do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
blkid_probe pr;
|
blkid_probe pr;
|
||||||
struct wipe_desc *w, *wp0 = clone_offset(wp);
|
struct wipe_desc *w, *wp0;
|
||||||
int zap = all ? 1 : wp->zap;
|
int zap = all ? 1 : wp->zap;
|
||||||
|
|
||||||
flags = O_RDWR;
|
flags = O_RDWR;
|
||||||
|
@ -324,6 +324,8 @@ do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet
|
||||||
if (!pr)
|
if (!pr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
wp0 = clone_offset(wp);
|
||||||
|
|
||||||
while (blkid_do_probe(pr) == 0) {
|
while (blkid_do_probe(pr) == 0) {
|
||||||
wp = get_desc_for_probe(wp, pr);
|
wp = get_desc_for_probe(wp, pr);
|
||||||
if (!wp)
|
if (!wp)
|
||||||
|
|
Loading…
Reference in New Issue