lscpu: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
9bf8088f25
commit
35d458708e
|
@ -166,7 +166,10 @@ static int address_from_efi(size_t *address)
|
|||
continue;
|
||||
*(addrp++) = '\0';
|
||||
if (strcmp(linebuf, "SMBIOS") == 0) {
|
||||
errno = 0;
|
||||
*address = strtoul(addrp, NULL, 0);
|
||||
if (errno)
|
||||
continue;
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue