parse-util: allow '-0' as alternative to '0' and '+0'
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Jun 2020 15:08:38 +0000 (17:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Jun 2020 13:56:31 +0000 (15:56 +0200)
commitc78eefc13562a8fc0c22c00a6d3001af89860258
treec883f0aa0eb469a965e6ad95b91562d04720e28f
parent707e93aff8f358f8a62117e54b857530d6594e4b
parse-util: allow '-0' as alternative to '0' and '+0'

Let's allow "-0" as alternative to "+0" and "0" when parsing integers,
unless the new SAFE_ATO_REFUSE_PLUS_MINUS flag is specified.

In cases where allowing the +/- syntax shall not be allowed
SAFE_ATO_REFUSE_PLUS_MINUS is the right flag to use, but this also means
that -0 as only negative integer that fits into an unsigned value should
be acceptable if the flag is not specified.
src/basic/parse-util.c