summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-08 23:03:38 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 08:20:20 +0200
commitece174c5439021e32ebcc858842de9586072c006 (patch)
treeb469235d6c4b195a6b53c7c5d97c0e516bfb4bc6 /src/udev
parent76ef789d264f9eb7d7624b994aa6eead1dacfac4 (diff)
tree-wide: drop {} from one-line if blocks
Patch via coccinelle.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/ethtool-util.c3
-rw-r--r--src/udev/scsi_id/scsi_serial.c3
-rw-r--r--src/udev/udev-ctrl.c6
-rw-r--r--src/udev/udev-rules.c3
-rw-r--r--src/udev/udevd.c3
5 files changed, 6 insertions, 12 deletions
diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
index 927b8abc64..a4b05d1bec 100644
--- a/src/udev/net/ethtool-util.c
+++ b/src/udev/net/ethtool-util.c
@@ -54,9 +54,8 @@ int ethtool_connect(int *ret) {
assert_return(ret, -EINVAL);
fd = socket(PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
+ if (fd < 0)
return -errno;
- }
*ret = fd;
diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c
index 3691a69d48..69260cb1a0 100644
--- a/src/udev/scsi_id/scsi_serial.c
+++ b/src/udev/scsi_id/scsi_serial.c
@@ -577,9 +577,8 @@ static int check_fill_0x83_id(struct udev *udev,
if (id_search->id_type == SCSI_ID_NAA && wwn != NULL) {
strncpy(wwn, &serial[s], 16);
- if (wwn_vendor_extension != NULL) {
+ if (wwn_vendor_extension != NULL)
strncpy(wwn_vendor_extension, &serial[s + 16], 16);
- }
}
return 0;
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
index 12bc6029b3..56277f551f 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/udev/udev-ctrl.c
@@ -121,14 +121,12 @@ int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl) {
err = bind(uctrl->sock, &uctrl->saddr.sa, uctrl->addrlen);
}
- if (err < 0) {
+ if (err < 0)
return log_error_errno(errno, "bind failed: %m");
- }
err = listen(uctrl->sock, 0);
- if (err < 0) {
+ if (err < 0)
return log_error_errno(errno, "listen failed: %m");
- }
uctrl->bound = true;
uctrl->cleanup_socket = true;
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 62e21e13a7..822f292217 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -672,9 +672,8 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi
const char *key = udev_list_entry_get_name(list_entry);
const char *val = udev_list_entry_get_value(list_entry);
- if (fnmatch(filter, key, 0) == 0) {
+ if (fnmatch(filter, key, 0) == 0)
udev_device_add_property(dev, key, val);
- }
}
return 0;
}
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index f354ced2e2..20497ae8be 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1670,9 +1670,8 @@ int main(int argc, char *argv[]) {
arg_children_max = 8;
- if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
+ if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == 0)
arg_children_max += CPU_COUNT(&cpu_set) * 2;
- }
log_debug("set children_max to %u", arg_children_max);
}