aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-28 15:18:53 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-28 15:18:53 +0100
commite992bae6f9adf3718c6263a36c004ead1c7272a8 (patch)
treef0bc9e4fa145f58ab3f9838902e09f9cfba29648 /libbb
parent86cfb70ca5f2bde11f2d071bc59db75291d8552f (diff)
downloadbusybox-w32-e992bae6f9adf3718c6263a36c004ead1c7272a8.tar.gz
busybox-w32-e992bae6f9adf3718c6263a36c004ead1c7272a8.tar.bz2
busybox-w32-e992bae6f9adf3718c6263a36c004ead1c7272a8.zip
*: remove a few more cases of argc usage. -89 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild1
-rw-r--r--libbb/single_argv.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild
index d9d5ad793..130ad25de 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -92,6 +92,7 @@ lib-y += setup_environment.o
92lib-y += sha1.o 92lib-y += sha1.o
93lib-y += signals.o 93lib-y += signals.o
94lib-y += simplify_path.o 94lib-y += simplify_path.o
95lib-y += single_argv.o
95lib-y += skip_whitespace.o 96lib-y += skip_whitespace.o
96lib-y += speed_table.o 97lib-y += speed_table.o
97lib-y += str_tolower.o 98lib-y += str_tolower.o
diff --git a/libbb/single_argv.c b/libbb/single_argv.c
new file mode 100644
index 000000000..6173c884e
--- /dev/null
+++ b/libbb/single_argv.c
@@ -0,0 +1,16 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2009 Denys Vlasenko
6 *
7 * Licensed under GPLv2, see file LICENSE in this tarball for details.
8 */
9#include "libbb.h"
10
11char* FAST_FUNC single_argv(char **argv)
12{
13 if (!argv[1] || argv[2])
14 bb_show_usage();
15 return argv[1];
16}