treewide: another round of simplifications

Using the same scripts as in f647962d64 "treewide: yet more log_*_errno
+ return simplifications".
This commit is contained in:
Michal Schmidt
2014-11-28 19:57:32 +01:00
parent 56f64d9576
commit 4a62c710b6
65 changed files with 433 additions and 854 deletions
+4 -8
View File
@@ -194,10 +194,8 @@ static int list_links(char **args, unsigned n) {
return log_error_errno(r, "Failed to connect to netlink: %m");
udev = udev_new();
if (!udev) {
log_error_errno(errno, "Failed to connect to udev: %m");
return -errno;
}
if (!udev)
return log_error_errno(errno, "Failed to connect to udev: %m");
r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
if (r < 0)
@@ -445,10 +443,8 @@ static int link_status(char **args, unsigned n) {
return log_error_errno(r, "Failed to connect to netlink: %m");
udev = udev_new();
if (!udev) {
log_error_errno(errno, "Failed to connect to udev: %m");
return -errno;
}
if (!udev)
return log_error_errno(errno, "Failed to connect to udev: %m");
if (n <= 1 && !arg_all) {
_cleanup_free_ char *operational_state = NULL;