mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
[PATCH] fix stroul endptr use
The endptr is never NULL, so here we hopefully do the right thing.
This commit is contained in:
parent
a6f01502bd
commit
aebef544cb
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user