summaryrefslogtreecommitdiff
path: root/dbus/dbus-memory.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-10-13 23:09:34 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2017-01-17 17:20:53 +0000
commit21eb3317c569cfd02d799aa67ae3ecf611373cab (patch)
tree01553d0e8c3fa700ae7d3dd5a80e8b6c8e55b756 /dbus/dbus-memory.c
parent81a99b483349313db44d3add31269a424fec1b9b (diff)
downloaddbus-21eb3317c569cfd02d799aa67ae3ecf611373cab.tar.gz
Move defaults for some switches into a default case
This is clearly equivalent, and quiets -Wswitch-default. Based on part of a patch by Thomas Zimmermann. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
Diffstat (limited to 'dbus/dbus-memory.c')
-rw-r--r--dbus/dbus-memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c
index bba9884e..a9c2f7a4 100644
--- a/dbus/dbus-memory.c
+++ b/dbus/dbus-memory.c
@@ -334,9 +334,10 @@ source_string (BlockSource source)
return "malloc0";
case SOURCE_REALLOC_NULL:
return "realloc(NULL)";
+ default:
+ _dbus_assert_not_reached ("Invalid malloc block source ID");
+ return "invalid!";
}
- _dbus_assert_not_reached ("Invalid malloc block source ID");
- return "invalid!";
}
static void