From: Lennart Poettering Date: Wed, 29 Nov 2023 10:06:36 +0000 (+0100) Subject: logind: cast various calls that return errors we ignore to (void) X-Git-Tag: v256-rc1~1297^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5157b0d8233e133caaec71c03fdae6ad772a98a2;p=thirdparty%2Fsystemd.git logind: cast various calls that return errors we ignore to (void) --- diff --git a/src/login/logind-session.c b/src/login/logind-session.c index b4277c33f14..869de629f56 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -798,17 +798,17 @@ int session_start(Session *s, sd_bus_message *properties, sd_bus_error *error) { user_elect_display(s->user); /* Save data */ - session_save(s); - user_save(s->user); + (void) session_save(s); + (void) user_save(s->user); if (s->seat) - seat_save(s->seat); + (void) seat_save(s->seat); /* Send signals */ session_send_signal(s, true); user_send_changed(s->user, "Display", NULL); if (s->seat && s->seat->active == s) - seat_send_changed(s->seat, "ActiveSession", NULL); + (void) seat_send_changed(s->seat, "ActiveSession", NULL); return 0; } @@ -894,8 +894,8 @@ int session_stop(Session *s, bool force) { user_elect_display(s->user); - session_save(s); - user_save(s->user); + (void) session_save(s); + (void) user_save(s->user); return r; } @@ -944,8 +944,8 @@ int session_finalize(Session *s) { session_reset_leader(s); - user_save(s->user); - user_send_changed(s->user, "Display", NULL); + (void) user_save(s->user); + (void) user_send_changed(s->user, "Display", NULL); return 0; } @@ -1119,9 +1119,8 @@ void session_set_type(Session *s, SessionType t) { return; s->type = t; - session_save(s); - - session_send_changed(s, "Type", NULL); + (void) session_save(s); + (void) session_send_changed(s, "Type", NULL); } int session_set_display(Session *s, const char *display) { @@ -1134,9 +1133,8 @@ int session_set_display(Session *s, const char *display) { if (r <= 0) /* 0 means the strings were equal */ return r; - session_save(s); - - session_send_changed(s, "Display", NULL); + (void) session_save(s); + (void) session_send_changed(s, "Display", NULL); return 1; } @@ -1151,9 +1149,8 @@ int session_set_tty(Session *s, const char *tty) { if (r <= 0) /* 0 means the strings were equal */ return r; - session_save(s); - - session_send_changed(s, "TTY", NULL); + (void) session_save(s); + (void) session_send_changed(s, "TTY", NULL); return 1; } @@ -1555,7 +1552,7 @@ int session_set_controller(Session *s, const char *sender, bool force, bool prep session_release_controller(s, true); s->controller = TAKE_PTR(name); - session_save(s); + (void) session_save(s); return 0; } @@ -1569,7 +1566,7 @@ void session_drop_controller(Session *s) { s->track = sd_bus_track_unref(s->track); session_set_type(s, s->original_type); session_release_controller(s, false); - session_save(s); + (void) session_save(s); session_restore_vt(s); }