mirror of
https://github.com/sheumann/hush.git
synced 2025-01-14 12:30:40 +00:00
Cleanup some warnings and a really obvious bug.
-Erik
This commit is contained in:
parent
655584b07a
commit
1b06419e60
@ -18,8 +18,8 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
int ch, rc = 0;
|
int ch, rc = 0;
|
||||||
int loadall = 0, showconfig = 0, debug = 0, autoclean = 0, list = 0;
|
int loadall = 0, showconfig = 0, debug = 0, autoclean = 0, list = 0;
|
||||||
int show_only = 0, quiet = 0, remove = 0, do_syslog = 0, verbose = 0;
|
int show_only = 0, quiet = 0, remove_opt = 0, do_syslog = 0, verbose = 0;
|
||||||
char *load_type = NULL, config = NULL;
|
char *load_type = NULL, *config = NULL;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "acdklnqrst:vVC:")) != -1)
|
while ((ch = getopt(argc, argv, "acdklnqrst:vVC:")) != -1)
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
@ -45,7 +45,7 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
quiet++;
|
quiet++;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
remove++;
|
remove_opt++;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
do_syslog++;
|
do_syslog++;
|
||||||
@ -76,7 +76,7 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
if (list)
|
if (list)
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
if (remove) {
|
if (remove_opt) {
|
||||||
do {
|
do {
|
||||||
sprintf(cmd, "rmmod %s %s %s",
|
sprintf(cmd, "rmmod %s %s %s",
|
||||||
optind >= argc ? "-a" : "",
|
optind >= argc ? "-a" : "",
|
||||||
|
@ -18,8 +18,8 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
int ch, rc = 0;
|
int ch, rc = 0;
|
||||||
int loadall = 0, showconfig = 0, debug = 0, autoclean = 0, list = 0;
|
int loadall = 0, showconfig = 0, debug = 0, autoclean = 0, list = 0;
|
||||||
int show_only = 0, quiet = 0, remove = 0, do_syslog = 0, verbose = 0;
|
int show_only = 0, quiet = 0, remove_opt = 0, do_syslog = 0, verbose = 0;
|
||||||
char *load_type = NULL, config = NULL;
|
char *load_type = NULL, *config = NULL;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "acdklnqrst:vVC:")) != -1)
|
while ((ch = getopt(argc, argv, "acdklnqrst:vVC:")) != -1)
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
@ -45,7 +45,7 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
quiet++;
|
quiet++;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
remove++;
|
remove_opt++;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
do_syslog++;
|
do_syslog++;
|
||||||
@ -76,7 +76,7 @@ extern int modprobe_main(int argc, char** argv)
|
|||||||
if (list)
|
if (list)
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
if (remove) {
|
if (remove_opt) {
|
||||||
do {
|
do {
|
||||||
sprintf(cmd, "rmmod %s %s %s",
|
sprintf(cmd, "rmmod %s %s %s",
|
||||||
optind >= argc ? "-a" : "",
|
optind >= argc ? "-a" : "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user