]> git.tue.mpg.de Git - dss.git/commitdiff
prune Simplify rm exit code logic.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 1 Sep 2019 17:31:40 +0000 (19:31 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 21 Sep 2019 13:08:40 +0000 (15:08 +0200)
We can rely on the fact that wait_for_remove_process() sets
snapshot_removal_status to the correct value on success.

dss.c

diff --git a/dss.c b/dss.c
index db454491c7024b78eba4a7cd692b9585badfd09f..126c366d99f89b1c9ae5c1e5fb89672fd14f87b9 100644 (file)
--- 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;