summaryrefslogtreecommitdiff
path: root/src/shared/login-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/login-shared.c')
-rw-r--r--src/shared/login-shared.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/login-shared.c b/src/shared/login-shared.c
index 054c77503b..64650a9134 100644
--- a/src/shared/login-shared.c
+++ b/src/shared/login-shared.c
@@ -23,7 +23,9 @@
#include "def.h"
bool session_id_valid(const char *id) {
- assert(id);
- return id[0] && id[strspn(id, LETTERS DIGITS)] == '\0';
+ if (isempty(id))
+ return false;
+
+ return id[strspn(id, LETTERS DIGITS)] == '\0';
}