X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=ssb_sprom%2Fssb_sprom.c;h=25236dca8979a5fccb196a671b7bfc178c1fe6d9;hb=006b58e7e80ec68d5b7720aaec5f127455c9f5fc;hp=5c1585e91a151337f41d9d04830f49a37b447972;hpb=883671d1a412bb7fb9d2b112f63a3fe10d02e726;p=b43-tools.git diff --git a/ssb_sprom/ssb_sprom.c b/ssb_sprom/ssb_sprom.c index 5c1585e..25236dc 100644 --- a/ssb_sprom/ssb_sprom.c +++ b/ssb_sprom/ssb_sprom.c @@ -33,8 +33,8 @@ struct cmdline_args cmdargs; -uint8_t sprom_rev; -uint16_t sprom_size; +static uint8_t sprom_rev; +static uint16_t sprom_size; /* SPROM layouts are described by the following table. The entries are as follows: * @@ -804,7 +804,7 @@ static int do_cmp_arg(char **argv, int *pos, } if (strcmp(arg, template) == 0) { if (param) { - if (*param == 0) { + if (*param == NULL) { prerror("%s needs a parameter\n", arg); return ARG_ERROR; } @@ -1081,20 +1081,20 @@ static int parse_args(int argc, char *argv[], int pass) return -1; } - if (arg_match(argv, &i, "--version", "-v", 0)) { + if (arg_match(argv, &i, "--version", "-v", NULL)) { print_banner(1); return 1; - } else if (arg_match(argv, &i, "--help", "-h", 0)) { + } else if (arg_match(argv, &i, "--help", "-h", NULL)) { goto out_usage; } else if (arg_match(argv, &i, "--input", "-i", ¶m)) { cmdargs.infile = param; } else if (arg_match(argv, &i, "--output", "-o", ¶m)) { cmdargs.outfile = param; - } else if (arg_match(argv, &i, "--verbose", "-V", 0)) { + } else if (arg_match(argv, &i, "--verbose", "-V", NULL)) { cmdargs.verbose = 1; - } else if (arg_match(argv, &i, "--force", "-n", 0)) { + } else if (arg_match(argv, &i, "--force", "-n", NULL)) { cmdargs.force = 1; - } else if (arg_match(argv, &i, "--binmode", "-b", 0)) { + } else if (arg_match(argv, &i, "--binmode", "-b", NULL)) { cmdargs.bin_mode = 1; } else if (pass == 2 && arg_match(argv, &i, "--rawset", "-s", ¶m)) { vparm = &(cmdargs.vparm[cmdargs.nr_vparm++]); @@ -1107,7 +1107,7 @@ static int parse_args(int argc, char *argv[], int pass) if (err < 0) goto error; - } else if (pass == 2 && arg_match(argv, &i, "--print-all", "-P", 0)) { + } else if (pass == 2 && arg_match(argv, &i, "--print-all", "-P", NULL)) { err = generate_printall(); if (err) goto error;