parse-util: make return parameter optional in safe_atou16_full()

All other safe_atoXYZ_full() functions have the parameter optional,
let's make it optoinal here, too.
This commit is contained in:
Lennart Poettering 2020-06-01 17:10:27 +02:00
parent c78eefc135
commit aa85e4d3ce
1 changed files with 3 additions and 1 deletions

View File

@ -535,7 +535,9 @@ int safe_atou16_full(const char *s, unsigned base, uint16_t *ret) {
if ((unsigned long) (uint16_t) l != l)
return -ERANGE;
*ret = (uint16_t) l;
if (ret)
*ret = (uint16_t) l;
return 0;
}