Merge pull request #30043 from mrc0mmand/more-assert_return

More `assert_return()` shenanigans
This commit is contained in:
Yu Watanabe
2023-11-16 11:28:33 +09:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -1161,7 +1161,6 @@ node /org/freedesktop/login1/session/1 {
readonly (so) Seat = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s TTY = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Display = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b Remote = ...;

View File

@@ -3121,8 +3121,9 @@ _public_ int sd_journal_query_unique(sd_journal *j, const char *field) {
assert_return(j, -EINVAL);
assert_return(!journal_origin_changed(j), -ECHILD);
assert_return(!isempty(field), -EINVAL);
assert_return(field_is_valid(field), -EINVAL);
if (!field_is_valid(field))
return -EINVAL;
r = free_and_strdup(&j->unique_field, field);
if (r < 0)

View File

@@ -875,7 +875,7 @@ static const sd_bus_vtable session_vtable[] = {
SD_BUS_PROPERTY("VTNr", "u", NULL, offsetof(Session, vtnr), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Seat", "(so)", property_get_seat, 0, SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("TTY", "s", NULL, offsetof(Session, tty), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Display", "s", NULL, offsetof(Session, display), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Display", "s", NULL, offsetof(Session, display), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("Remote", "b", bus_property_get_bool, offsetof(Session, remote), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("RemoteHost", "s", NULL, offsetof(Session, remote_host), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("RemoteUser", "s", NULL, offsetof(Session, remote_user), SD_BUS_VTABLE_PROPERTY_CONST),