mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
logind-user: add missing assertion for user_check_linger_file
Also make the function take const User*
This commit is contained in:
parent
acddb3cb79
commit
194dba5ef5
@ -669,9 +669,12 @@ int user_get_idle_hint(User *u, dual_timestamp *t) {
|
||||
return idle_hint;
|
||||
}
|
||||
|
||||
int user_check_linger_file(User *u) {
|
||||
int user_check_linger_file(const User *u) {
|
||||
_cleanup_free_ char *cc = NULL;
|
||||
char *p = NULL;
|
||||
const char *p;
|
||||
|
||||
assert(u);
|
||||
assert(u->user_record);
|
||||
|
||||
cc = cescape(u->user_record->user_name);
|
||||
if (!cc)
|
||||
|
@ -82,7 +82,7 @@ int user_get_idle_hint(User *u, dual_timestamp *t);
|
||||
int user_save(User *u);
|
||||
int user_load(User *u);
|
||||
int user_kill(User *u, int signo);
|
||||
int user_check_linger_file(User *u);
|
||||
int user_check_linger_file(const User *u);
|
||||
void user_elect_display(User *u);
|
||||
void user_update_last_session_timer(User *u);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user