Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/strutils: improve strtoul_or_err() for negative numbers
Let's use the same code for strtoul_or_err() and strtol_or_err() as we already use for strtoxXX_or_err() functions. It resolves issue with negative numbers. This problem has been discovered by "./eject -x -1 -v" where -x is based on strtoul_or_err(), but accepts negative number (-1). Reported-by: Enze Li <lienze@kylinos.cn> Signed-off-by: Karel Zak <kzak@redhat.com>
- Loading branch information
Showing
2 changed files
with
2 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters