Remove some dead code
Based on coverity report.
This commit is contained in:
parent
a7edaadd78
commit
4dd1de72e8
|
@ -823,9 +823,6 @@ static void svg_ps_bars(void) {
|
||||||
double starttime;
|
double starttime;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
if (!ps)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
enc_name = xml_comment_encode(ps->name);
|
enc_name = xml_comment_encode(ps->name);
|
||||||
if(!enc_name)
|
if(!enc_name)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -978,9 +978,8 @@ static DBusConnection* manager_bus_connect_private(Manager *m, DBusBusType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (connection)
|
|
||||||
dbus_connection_close(connection);
|
|
||||||
dbus_error_free(&error);
|
dbus_error_free(&error);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,8 +241,7 @@ int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
base[0] = '\0';
|
base[0] = '\0';
|
||||||
}
|
}
|
||||||
if (base == NULL)
|
|
||||||
return -EINVAL;
|
|
||||||
strscpyl(base, size - (base - syspath), "/", &link_target[back * 3], NULL);
|
strscpyl(base, size - (base - syspath), "/", &link_target[back * 3], NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,15 +77,11 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
|
||||||
a = found->ut_pid & 0xFF;
|
a = found->ut_pid & 0xFF;
|
||||||
b = (found->ut_pid >> 8) & 0xFF;
|
b = (found->ut_pid >> 8) & 0xFF;
|
||||||
|
|
||||||
if (a < 0 || b < 0)
|
*runlevel = a;
|
||||||
r = -EIO;
|
if (previous)
|
||||||
else {
|
*previous = b;
|
||||||
*runlevel = a;
|
|
||||||
|
|
||||||
if (previous)
|
r = 0;
|
||||||
*previous = b;
|
|
||||||
r = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
endutxent();
|
endutxent();
|
||||||
|
|
|
@ -367,8 +367,6 @@ static int read_ntp(DBusConnection *bus) {
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply)
|
|
||||||
dbus_message_unref(reply);
|
|
||||||
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
|
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
|
||||||
if (!reply) {
|
if (!reply) {
|
||||||
if (streq(error.name, "org.freedesktop.DBus.Error.FileNotFound")) {
|
if (streq(error.name, "org.freedesktop.DBus.Error.FileNotFound")) {
|
||||||
|
@ -450,8 +448,6 @@ static int start_ntp(DBusConnection *bus, DBusError *error) {
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply)
|
|
||||||
dbus_message_unref(reply);
|
|
||||||
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, error);
|
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, error);
|
||||||
if (!reply) {
|
if (!reply) {
|
||||||
if (streq(error->name, "org.freedesktop.DBus.Error.FileNotFound") ||
|
if (streq(error->name, "org.freedesktop.DBus.Error.FileNotFound") ||
|
||||||
|
@ -540,8 +536,6 @@ static int enable_ntp(DBusConnection *bus, DBusError *error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply)
|
|
||||||
dbus_message_unref(reply);
|
|
||||||
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, error);
|
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, error);
|
||||||
if (!reply) {
|
if (!reply) {
|
||||||
if (streq(error->name, "org.freedesktop.DBus.Error.FileNotFound")) {
|
if (streq(error->name, "org.freedesktop.DBus.Error.FileNotFound")) {
|
||||||
|
|
|
@ -214,7 +214,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[])
|
||||||
exec_list(udev_enumerate, action);
|
exec_list(udev_enumerate, action);
|
||||||
goto exit;
|
goto exit;
|
||||||
default:
|
default:
|
||||||
goto exit;
|
assert_not_reached("device_type");
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
udev_enumerate_unref(udev_enumerate);
|
udev_enumerate_unref(udev_enumerate);
|
||||||
|
|
Loading…
Reference in a new issue