X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Fhelpers.c;h=e96f5db81ebf9df3c9af2d646875aa944b1d21ff;hp=0f3671e526d838264d78d8f68b2120acbaa71e44;hb=9056c31b46452c92c7dd9c276664f514720a84c6;hpb=9071df66fc6a29cc8b6cd52c91134efe7b57f007 diff --git a/ccan/opt/helpers.c b/ccan/opt/helpers.c index 0f3671e5..e96f5db8 100644 --- a/ccan/opt/helpers.c +++ b/ccan/opt/helpers.c @@ -91,10 +91,8 @@ char *opt_set_longval(const char *arg, long *l) *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; }