mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
login: use NULL to denote arg-less method call
"" and NULL are equivalent, but the latter is normally used.
This commit is contained in:
@@ -61,7 +61,7 @@ static int print_inhibitors(sd_bus *bus) {
|
||||
|
||||
pager_open(arg_pager_flags);
|
||||
|
||||
r = bus_call_method(bus, bus_login_mgr, "ListInhibitors", &error, &reply, "");
|
||||
r = bus_call_method(bus, bus_login_mgr, "ListInhibitors", &error, &reply, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Could not get active inhibitors: %s", bus_error_message(&error, r));
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static void print_inhibitors(sd_bus *bus) {
|
||||
unsigned n = 0;
|
||||
int r;
|
||||
|
||||
r = bus_call_method(bus, bus_login_mgr, "ListInhibitors", &error, &reply, "");
|
||||
r = bus_call_method(bus, bus_login_mgr, "ListInhibitors", &error, &reply, NULL);
|
||||
assert_se(r >= 0);
|
||||
|
||||
r = sd_bus_message_enter_container(reply, SD_BUS_TYPE_ARRAY, "(ssssuu)");
|
||||
|
||||
@@ -57,7 +57,7 @@ TEST(set_type) {
|
||||
|
||||
/* Type is reset to the original value when we release control of the session */
|
||||
assert_se(!streq(type, "tty"));
|
||||
assert_se(bus_call_method(bus, &session, "ReleaseControl", NULL, NULL, "") >= 0);
|
||||
assert_se(bus_call_method(bus, &session, "ReleaseControl", NULL, NULL, NULL) >= 0);
|
||||
type = mfree(type);
|
||||
assert_se(bus_get_property_string(bus, &session, "Type", NULL, &type) >= 0);
|
||||
assert_se(streq(type, "tty"));
|
||||
|
||||
Reference in New Issue
Block a user