*: remove a few more cases of argc usage. -89 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -92,6 +92,7 @@ lib-y += setup_environment.o
|
||||
lib-y += sha1.o
|
||||
lib-y += signals.o
|
||||
lib-y += simplify_path.o
|
||||
lib-y += single_argv.o
|
||||
lib-y += skip_whitespace.o
|
||||
lib-y += speed_table.o
|
||||
lib-y += str_tolower.o
|
||||
|
16
libbb/single_argv.c
Normal file
16
libbb/single_argv.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Utility routines.
|
||||
*
|
||||
* Copyright (C) 2009 Denys Vlasenko
|
||||
*
|
||||
* Licensed under GPLv2, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
|
||||
char* FAST_FUNC single_argv(char **argv)
|
||||
{
|
||||
if (!argv[1] || argv[2])
|
||||
bb_show_usage();
|
||||
return argv[1];
|
||||
}
|
Reference in New Issue
Block a user