aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-05 18:31:19 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-05 18:31:19 +0200
commite7ac7abf06c90e19525484bf3da97fe9b435f185 (patch)
tree2aefb1e5b21b70322636e356137d29794744336b
parentd88f94a5df3a2edb8ba56fab5c13674b452f87ab (diff)
downloadbusybox-e7ac7abf06c90e19525484bf3da97fe9b435f185.tar.gz
nl: use CONFIG_NL, not CONFIG_UNIQ
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/nl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/nl.c b/coreutils/nl.c
index 97931f334..a86746974 100644
--- a/coreutils/nl.c
+++ b/coreutils/nl.c
@@ -8,9 +8,9 @@
//config: help
//config: nl is used to number lines of files.
-//applet:IF_UNIQ(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_NL(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP))
-//kbuild:lib-$(CONFIG_UNIQ) += nl.o
+//kbuild:lib-$(CONFIG_NL) += nl.o
//usage:#define nl_trivial_usage
//usage: "[OPTIONS] [FILE]..."
@@ -56,7 +56,6 @@ void FAST_FUNC print_numbered_lines(struct number_state *ns, const char *filenam
int nl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nl_main(int argc UNUSED_PARAM, char **argv)
{
- unsigned opt;
struct number_state ns;
const char *opt_b = "t";
enum {
@@ -83,10 +82,10 @@ int nl_main(int argc UNUSED_PARAM, char **argv)
ns.start = 1;
ns.inc = 1;
ns.sep = "\t";
- opt = getopt32(argv, "pw:+s:v:+i:+b:", &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b);
+ getopt32(argv, "pw:+s:v:+i:+b:", &ns.width, &ns.sep, &ns.start, &ns.inc, &opt_b);
ns.all = (opt_b[0] == 'a');
ns.nonempty = (opt_b[0] == 't');
- ns.empty_str = xasprintf("%*s\n", ns.width + strlen(ns.sep), "");
+ ns.empty_str = xasprintf("%*s\n", ns.width + (int)strlen(ns.sep), "");
argv += optind;
if (!*argv)