summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRob Landley2006-07-12 21:31:16 +0000
committerRob Landley2006-07-12 21:31:16 +0000
commit1f9145c5c381f5ec01c6d6b51bc1e19a18088ba2 (patch)
tree1aeca0400e9765268ce4e951aa56e094f91b7d67 /libbb
parent58dda84ecc13d8e2bb3c6e2b73786ae22e2d9b10 (diff)
downloadbusybox-1f9145c5c381f5ec01c6d6b51bc1e19a18088ba2.zip
busybox-1f9145c5c381f5ec01c6d6b51bc1e19a18088ba2.tar.gz
More minor tweaks.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xgetlarg.c10
-rw-r--r--libbb/xgetularg.c2
2 files changed, 2 insertions, 10 deletions
diff --git a/libbb/xgetlarg.c b/libbb/xgetlarg.c
index cadb83e..5b1e7b9 100644
--- a/libbb/xgetlarg.c
+++ b/libbb/xgetlarg.c
@@ -20,14 +20,8 @@ long bb_xgetlarg(const char *arg, int base, long lower, long upper)
char *endptr;
int errno_save = errno;
- assert(arg!=NULL);
-
- /* Don't allow leading whitespace.
- * Wrap isspace in () to make sure we call the
- * function rather than the macro. */
- if ((isspace)(*arg)) {
- bb_show_usage();
- }
+ if (ENABLE_DEBUG && arg==NULL)
+ bb_error_msg_and_die("Null in xgetlarg.");
errno = 0;
result = strtol(arg, &endptr, base);
diff --git a/libbb/xgetularg.c b/libbb/xgetularg.c
index 6110746..21b0d12 100644
--- a/libbb/xgetularg.c
+++ b/libbb/xgetularg.c
@@ -89,9 +89,7 @@ long bb_xgetlarg_bnd_sfx(const char *arg, int base,
if ((*p == '-') && (p[1] != '+')) {
++p;
-#if LONG_MAX == (-(LONG_MIN + 1))
++u; /* two's complement */
-#endif
}
r = bb_xgetularg_bnd_sfx(p, base, 0, u, suffixes);