uuidd: fix -n usage

It does not make sense to request zero UUIDs - report error.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
This commit is contained in:
Petr Uzel 2011-02-03 15:04:58 +01:00 committed by Karel Zak
parent 2307a2b9ea
commit 38cf50010f
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ int main(int argc, char **argv)
break;
case 'n':
num = strtol(optarg, &tmp, 0);
if ((num < 0) || *tmp) {
if ((num < 1) || *tmp) {
fprintf(stderr, _("Bad number: %s\n"), optarg);
exit(1);
}