summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-device/sd-device.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-24 06:07:42 -0400
committerLennart Poettering <lennart@poettering.net>2016-05-24 12:07:42 +0200
commit755700bbd4a67661f40e963faccf8cf1fef84f9a (patch)
treebe68e103ba3362ec7ea4a2d2b194c4433a20ee06 /src/libsystemd/sd-device/sd-device.c
parente77813ca9f4e0735fd0e3e2caae4d7d1ee436011 (diff)
Udevadm trivial cleanups (#3331)
* udevadm-info: use _cleanup_ * udevadm-info: propagate return value from export_devices() * sd-device: add comment and remove unnecessary braces
Diffstat (limited to 'src/libsystemd/sd-device/sd-device.c')
-rw-r--r--src/libsystemd/sd-device/sd-device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index 2d7e482b46..5c9e00ed80 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -533,7 +533,7 @@ int device_read_uevent_file(sd_device *device) {
return r;
}
- for (i = 0; i < uevent_len; i++) {
+ for (i = 0; i < uevent_len; i++)
switch (state) {
case PRE_KEY:
if (!strchr(NEWLINE, uevent[i])) {
@@ -558,9 +558,9 @@ int device_read_uevent_file(sd_device *device) {
break;
case PRE_VALUE:
value = &uevent[i];
-
state = VALUE;
+ /* fall through to handle empty property */
case VALUE:
if (strchr(NEWLINE, uevent[i])) {
uevent[i] = '\0';
@@ -576,7 +576,6 @@ int device_read_uevent_file(sd_device *device) {
default:
assert_not_reached("invalid state when parsing uevent file");
}
- }
if (major) {
r = device_set_devnum(device, major, minor);