[systemd-devel] [PATCH 1/2] machine: machinectl, remove some dead code

Philippe De Swert philippedeswert at gmail.com
Wed Dec 31 06:16:02 PST 2014


The variable r is already checked one time before and the same error returned.
So the second check is unneeded.
---
 src/machine/machinectl.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 0abc251..951b3cc 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -250,10 +250,6 @@ static int list_images(int argc, char *argv[], void *userdata) {
                        (int) max_mtime, strna(format_timestamp(mtime_buf, sizeof(mtime_buf), images[j].mtime)));
         }
 
-        if (r < 0)
-                return bus_log_parse_error(r);
-
-
         if (arg_legend)
                 printf("\n%zu images listed.\n", n_images);
 
-- 
2.1.3



More information about the systemd-devel mailing list