diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-27 14:28:24 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-28 09:03:06 +0100 |
commit | 10c353e1c58d1496f591a48036369021212d8652 (patch) | |
tree | 7fc3878c4d3bca99f1726f366d8a3a2dbc826349 /src/libsystemd/sd-device | |
parent | 4e494d17dbba1db9fd10144f7a1056772f7f9cd0 (diff) | |
download | systemd-10c353e1c58d1496f591a48036369021212d8652.tar.gz systemd-10c353e1c58d1496f591a48036369021212d8652.tar.bz2 systemd-10c353e1c58d1496f591a48036369021212d8652.zip |
Remove variable only used for an assert
When compiled with -DNDEBUG, we get warnings about set-but-unused variables.
In general, it's not something we care about, but since removing those
variables arguably makes the code nicer, let's just to it in this case.
Diffstat (limited to 'src/libsystemd/sd-device')
-rw-r--r-- | src/libsystemd/sd-device/device-enumerator.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c index 4da6e65210..4357860170 100644 --- a/src/libsystemd/sd-device/device-enumerator.c +++ b/src/libsystemd/sd-device/device-enumerator.c @@ -428,7 +428,6 @@ static bool match_tag(sd_device_enumerator *enumerator, sd_device *device) { static bool match_parent(sd_device_enumerator *enumerator, sd_device *device) { const char *syspath_parent, *syspath; Iterator i; - int r; assert(enumerator); assert(device); @@ -436,8 +435,7 @@ static bool match_parent(sd_device_enumerator *enumerator, sd_device *device) { if (set_isempty(enumerator->match_parent)) return true; - r = sd_device_get_syspath(device, &syspath); - assert(r >= 0); + assert_se(sd_device_get_syspath(device, &syspath) >= 0); SET_FOREACH(syspath_parent, enumerator->match_parent, i) if (path_startswith(syspath, syspath_parent)) |