From fe7cd642b0b732f5d41403c2f6983ad676b69dd9 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 18 Aug 2007 15:32:12 +0000 Subject: don't pass argc in getopt32, it's superfluous (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped --- selinux/chcon.c | 2 +- selinux/getsebool.c | 2 +- selinux/matchpathcon.c | 2 +- selinux/runcon.c | 2 +- selinux/setfiles.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'selinux') diff --git a/selinux/chcon.c b/selinux/chcon.c index a955228..f0590b5 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c @@ -136,7 +136,7 @@ int chcon_main(int argc, char **argv) ":\xff--urtl:u--\xff:r--\xff:t--\xff:l--\xff" #endif ":f--v:v--f"; /* 'verbose' and 'quiet' are exclusive */ - getopt32(argc, argv, "Rchf:u:r:t:l:v", + getopt32(argv, "Rchf:u:r:t:l:v", &user, &role, &type, &range, &reference_file); argv += optind; diff --git a/selinux/getsebool.c b/selinux/getsebool.c index b059003..06a2980 100644 --- a/selinux/getsebool.c +++ b/selinux/getsebool.c @@ -16,7 +16,7 @@ int getsebool_main(int argc, char **argv) unsigned opt; selinux_or_die(); - opt = getopt32(argc, argv, "a"); + opt = getopt32(argv, "a"); if (opt) { /* -a */ if (argc > 2) diff --git a/selinux/matchpathcon.c b/selinux/matchpathcon.c index 8d681d0..2bc0a33 100644 --- a/selinux/matchpathcon.c +++ b/selinux/matchpathcon.c @@ -38,7 +38,7 @@ int matchpathcon_main(int argc, char **argv) opt_complementary = "-1" /* at least one param reqd */ ":?:f--p:p--f"; /* mutually exclusive */ - opts = getopt32(argc, argv, "nNf:p:V", &fcontext, &prefix); + opts = getopt32(argv, "nNf:p:V", &fcontext, &prefix); argv += optind; if (opts & OPT_NOT_TRANS) { diff --git a/selinux/runcon.c b/selinux/runcon.c index 015a233..37ac5d1 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c @@ -104,7 +104,7 @@ int runcon_main(int argc, char **argv) applet_long_options = runcon_longopts; #endif opt_complementary = "-1"; - opts = getopt32(argc, argv, "r:t:u:l:ch", &role, &type, &user, &range); + opts = getopt32(argv, "r:t:u:l:ch", &role, &type, &user, &range); argv += optind; if (!(opts & OPTS_CONTEXT_COMPONENT)) { diff --git a/selinux/setfiles.c b/selinux/setfiles.c index 08b911a..174d4ce 100644 --- a/selinux/setfiles.c +++ b/selinux/setfiles.c @@ -537,10 +537,10 @@ int setfiles_main(int argc, char **argv) opt_complementary = "e::vv:v--p:p--v:v--q:q--v"; /* Option order must match OPT_x definitions! */ if (applet_name[0] == 'r') { /* restorecon */ - flags = getopt32(argc, argv, "de:f:ilnpqrsvo:FWR", + flags = getopt32(argv, "de:f:ilnpqrsvo:FWR", &exclude_dir, &input_filename, &out_filename, &verbose); } else { /* setfiles */ - flags = getopt32(argc, argv, "de:f:ilnpqr:svo:FW" + flags = getopt32(argv, "de:f:ilnpqr:svo:FW" USE_FEATURE_SETFILES_CHECK_OPTION("c:"), &exclude_dir, &input_filename, &rootpath, &out_filename, USE_FEATURE_SETFILES_CHECK_OPTION(&policyfile,) -- cgit v1.1