[glib: 6/9] gobject-query: Combine two identical if-branches




commit 6211e25953eecc683cc2e19e99ed2c9789f7a03a
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Jun 9 13:23:11 2022 +0100

    gobject-query: Combine two identical if-branches
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gobject/gobject-query.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c
index c6b56ab13e..1bb5519917 100644
--- a/gobject/gobject-query.c
+++ b/gobject/gobject-query.c
@@ -170,11 +170,8 @@ main (gint   argc,
        {
          gen_tree = 1;
        }
-      else if (strcmp ("-h", argv[i]) == 0)
-       {
-         return help (NULL);
-       }
-      else if (strcmp ("--help", argv[i]) == 0)
+      else if (strcmp ("-h", argv[i]) == 0 ||
+               strcmp ("--help", argv[i]) == 0)
        {
          return help (NULL);
        }


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