[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] daemon: btrfs: remove dead check



In btrfs_subvolume_show, an extra check on 'key' is used in a place
where this variable is already checked to be non-null.
---
 daemon/btrfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index f11902b21..d363ada6d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -990,7 +990,7 @@ do_btrfs_subvolume_show (const char *subvolume)
           return NULL;
       }
     } else {
-      if (add_string (&ret, key ? key : "") == -1)
+      if (add_string (&ret, key) == -1)
         return NULL;
       if (value && !STREQ (value, "-")) {
         if (add_string (&ret, value) == -1)
-- 
2.13.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]