chiark / gitweb /
util: loop_write - accept 0-length message
[elogind.git] / src / shared / login-shared.c
index 054c77503be45244648b8d393b1ef7c597b17034..64650a91341114ca701315d26658e95606605f89 100644 (file)
@@ -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';
 }