Sync with upstream grep.
Change-Id: Ie1da2e95ee7e3513afb87f357be983dc80cd1515
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 @@
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 @@
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 @@
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':