summaryrefslogtreecommitdiff
path: root/mkpasswd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkpasswd.c')
-rw-r--r--mkpasswd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mkpasswd.c b/mkpasswd.c
index 5820f32..d7c31a1 100644
--- a/mkpasswd.c
+++ b/mkpasswd.c
@@ -179,11 +179,14 @@ int main(int argc, char *argv[])
case 'R':
{
char *p;
- rounds = strtol(optarg, &p, 10);
- if (p == NULL || *p != '\0' || rounds < 0) {
+ long r;
+
+ r = strtol(optarg, &p, 10);
+ if (p == NULL || *p != '\0' || r < 0) {
fprintf(stderr, _("Invalid number '%s'.\n"), optarg);
exit(1);
}
+ rounds = r;
}
break;
case 's':