summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/libbb/xgetlarg.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
commit4aca87515a5083ae0e31ce3177189fd43b6d05ac (patch)
tree7b1d9a31393ca090757dc6f0d3859b4fcd93f271 /release/src/router/busybox/libbb/xgetlarg.c
parent008d0be72b2f160382c6e880765e96b64a050c65 (diff)
downloadtomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.gz
tomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.bz2
patch to Vanilla Tomato 1.28
Diffstat (limited to 'release/src/router/busybox/libbb/xgetlarg.c')
-rw-r--r--release/src/router/busybox/libbb/xgetlarg.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/release/src/router/busybox/libbb/xgetlarg.c b/release/src/router/busybox/libbb/xgetlarg.c
deleted file mode 100644
index ed5d3eb4..00000000
--- a/release/src/router/busybox/libbb/xgetlarg.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Copyright (C) 2003 Erik Andersen <andersen@codepoet.org>
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <errno.h>
-#include <assert.h>
-#include <ctype.h>
-
-#include "busybox.h"
-
-extern long bb_xgetlarg(const char *arg, int base, long lower, long upper)
-{
- long result;
- char *endptr;
- int errno_save = errno;
-
- assert(arg!=NULL);
-
- /* Don't allow leading whitespace. */
- if ((isspace)(*arg)) { /* Use an actual funciton call for minimal size. */
- bb_show_usage();
- }
-
- errno = 0;
- result = strtol(arg, &endptr, base);
- if (errno != 0 || *endptr!='\0' || endptr==arg || result < lower || result > upper)
- bb_show_usage();
- errno = errno_save;
- return result;
-}