*l = strtol(arg, &endp, 0);
if (*endp || !arg[0])
return arg_bad("'%s' is not a number", arg);
- if (errno == ERANGE)
- return arg_bad("'%s' is out of range", arg);
if (errno)
- return opt_invalid_argument(arg);
+ return arg_bad("'%s' is out of range", arg);
return NULL;
}
len = OPT_SHOW_LEN - 2;
strncpy(buf+1, *p, len);
buf[1+len] = '"';
+ if (len < OPT_SHOW_LEN - 2)
+ buf[2+len] = '\0';
}
/* Set an integer value, various forms. Sets to 1 on arg == NULL. */