From: Andre Noll Date: Sun, 1 Sep 2019 17:31:40 +0000 (+0200) Subject: prune Simplify rm exit code logic. X-Git-Tag: v1.0.1~1^2~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=8255344c3fe023bde18aa06e0f860752445d0735;p=dss.git prune Simplify rm exit code logic. We can rely on the fact that wait_for_remove_process() sets snapshot_removal_status to the correct value on success. --- diff --git a/dss.c b/dss.c index db45449..126c366 100644 --- a/dss.c +++ b/dss.c @@ -1686,11 +1686,9 @@ rm: ret = wait_for_remove_process(); if (ret < 0) goto out; - if (snapshot_removal_status != HS_SUCCESS) - goto out; + assert(snapshot_removal_status == HS_SUCCESS); post_remove_hook(); - if (snapshot_removal_status != HS_POST_RUNNING) - goto out; + assert(snapshot_removal_status == HS_POST_RUNNING); ret = wait_for_remove_process(); if (ret < 0) goto out;