Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mxqset: Remove unused variable and argument
  • Loading branch information
donald committed May 5, 2022
1 parent 177f6ea commit 0ea4705
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mxqset.c
Expand Up @@ -195,7 +195,7 @@ static const struct argp_option options[] = {

static const struct argp argp = { options, parser, NULL, NULL };

static __attribute__ ((noreturn)) void exit_usage(char *argv0) {
static __attribute__ ((noreturn)) void exit_usage(void) {
fprintf(stderr,
"usage: %s group GID [group-options]\n"
"\n"
Expand All @@ -210,22 +210,20 @@ static __attribute__ ((noreturn)) void exit_usage(char *argv0) {
}

int main(int argc, char **argv) {

char *argv0=argv[0];
struct mx_mysql *mysql = NULL;
int groupid;
uid_t uid = getuid();

if (argc<3 || strcmp(argv[1],"group") != 0)
exit_usage(argv0);
exit_usage();
groupid=atoi(argv[2]);

int sts;
struct opts opts={0};

sts=argp_parse (&argp, argc-3, &argv[3], ARGP_PARSE_ARGV0|ARGP_SILENT, NULL, &opts);
if (sts)
exit_usage(argv0);
exit_usage();

assert(mx_mysql_initialize(&mysql) == 0);
mx_mysql_option_set_default_file(mysql, MXQ_MYSQL_DEFAULT_FILE);
Expand Down

0 comments on commit 0ea4705

Please sign in to comment.