dbus-monitor: handle default case for binary mode header
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 17 Jan 2017 20:42:31 +0000 (20:42 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Apr 2017 11:07:21 +0000 (12:07 +0100)
Also comment why it's OK to not do anything for the modes that don't
have a header. We are effectively treating the default case as one
of those, on the assumption that future modes are more likely to
lack a header than to have one.

Based on part of a patch from Thomas Zimmermann.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191

tools/dbus-monitor.c

index 4edee29..c6f36d5 100644 (file)
@@ -555,6 +555,8 @@ main (int argc, char *argv[])
     {
       case BINARY_MODE_NOT:
       case BINARY_MODE_RAW:
+      default:
+        /* no special header needed */
         break;
 
       case BINARY_MODE_PCAP: