diff options
Diffstat (limited to 'tools/dbus-send.c')
-rw-r--r-- | tools/dbus-send.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/dbus-send.c b/tools/dbus-send.c index 6fb65fe0..efeb76e0 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -289,13 +289,16 @@ main (int argc, char *argv[]) } else if ((strstr (arg, "--bus=") == arg) || (strstr (arg, "--peer=") == arg) || (strstr (arg, "--address=") == arg)) { - if (arg[2] == 'b') /* bus */ + /* Check for peer first, to avoid the GCC -Wduplicated-branches + * warning. + */ + if (arg[2] == 'p') /* peer */ { - is_bus = TRUE; + is_bus = FALSE; } - else if (arg[2] == 'p') /* peer */ + else if (arg[2] == 'b') /* bus */ { - is_bus = FALSE; + is_bus = TRUE; } else /* address; keeping backwards compatibility */ { |