chiark / gitweb /
[PATCH] fix stroul endptr use
[elogind.git] / klibc_fixups.c
index 1241eb7d108061c98fc2af0c114f807dfe757983..99460c32f71240ce08a9c5fad00c9954427206e9 100644 (file)
@@ -74,7 +74,7 @@ static unsigned long get_id_by_name(const char *uname, const char *dbfile)
 
                if (strcmp(uname, name) == 0) {
                        id = strtoul(idstr, &tail, 10);
-                       if (tail == NULL)
+                       if (tail[0] != '\0')
                                id = -1;
                        else
                                dbg("id for '%s' is '%li'", name, id);