diff options
author | Elliott Hughes <enh@google.com> | 2014-07-10 19:38:01 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-10 19:38:01 -0700 |
commit | 04650ef7f6167d59aad19d4cd6fc78b2d84c83e5 (patch) | |
tree | 0a4355e241c30864f9bfd96657ff9874ca4dd225 /toolbox/grep/grep.c | |
parent | 7a8420ec4a7d248028b0a922e2d947f2129b1fe7 (diff) | |
download | system_core-04650ef7f6167d59aad19d4cd6fc78b2d84c83e5.zip system_core-04650ef7f6167d59aad19d4cd6fc78b2d84c83e5.tar.gz system_core-04650ef7f6167d59aad19d4cd6fc78b2d84c83e5.tar.bz2 |
Sync with upstream grep.
Change-Id: Ie1da2e95ee7e3513afb87f357be983dc80cd1515
Diffstat (limited to 'toolbox/grep/grep.c')
-rw-r--r-- | toolbox/grep/grep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toolbox/grep/grep.c b/toolbox/grep/grep.c index 7dc4bcc..7314e13 100644 --- a/toolbox/grep/grep.c +++ b/toolbox/grep/grep.c @@ -402,7 +402,7 @@ grep_main(int argc, char *argv[]) Aflag = 0; else if (Aflag > LLONG_MAX / 10) { errno = ERANGE; - err(2, "%llu", Aflag); + err(2, NULL); } Aflag = Bflag = (Aflag * 10) + (c - '0'); break; @@ -419,10 +419,10 @@ grep_main(int argc, char *argv[]) l = strtoull(optarg, &ep, 10); if (((errno == ERANGE) && (l == ULLONG_MAX)) || ((errno == EINVAL) && (l == 0))) - err(2, "strtoull"); + err(2, NULL); else if (ep[0] != '\0') { errno = EINVAL; - err(2, "empty"); + err(2, NULL); } if (c == 'A') Aflag = l; @@ -508,10 +508,10 @@ grep_main(int argc, char *argv[]) mcount = strtoull(optarg, &ep, 10); if (((errno == ERANGE) && (mcount == ULLONG_MAX)) || ((errno == EINVAL) && (mcount == 0))) - err(2, "strtoull"); + err(2, NULL); else if (ep[0] != '\0') { errno = EINVAL; - err(2, "empty"); + err(2, NULL); } break; case 'n': |