Skip to content

Commit

Permalink
btrfs-progs: unify getopt table terminators
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.cz>
  • Loading branch information
kdave committed Jan 21, 2015
1 parent 58a3952 commit 34c2889
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion btrfs-corrupt-block.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ int main(int ac, char **av)
{ "item", 0, NULL, 'I'},
{ "dir-item", 0, NULL, 'D'},
{ "delete", 0, NULL, 'd'},
{ 0, 0, 0, 0}
{ NULL, 0, NULL, 0 }
};

c = getopt_long(ac, av, "l:c:b:eEkuUi:f:x:m:K:IDd", long_options,
Expand Down
4 changes: 2 additions & 2 deletions cmds-balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int cmd_balance_start(int argc, char **argv)
{ "system", optional_argument, NULL, 's' },
{ "force", no_argument, NULL, 'f' },
{ "verbose", no_argument, NULL, 'v' },
{ NULL, no_argument, NULL, 0 },
{ NULL, 0, NULL, 0 }
};

int opt = getopt_long(argc, argv, "d::s::m::fv", longopts,
Expand Down Expand Up @@ -664,7 +664,7 @@ static int cmd_balance_status(int argc, char **argv)
int longindex;
static const struct option longopts[] = {
{ "verbose", no_argument, NULL, 'v' },
{ NULL, no_argument, NULL, 0}
{ NULL, 0, NULL, 0 }
};

int opt = getopt_long(argc, argv, "v", longopts, &longindex);
Expand Down
5 changes: 3 additions & 2 deletions cmds-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static int cmd_add_dev(int argc, char **argv)
static const struct option long_options[] = {
{ "nodiscard", optional_argument, NULL, 'K'},
{ "force", no_argument, NULL, 'f'},
{ 0, 0, 0, 0 }
{ NULL, 0, NULL, 0}
};
int c = getopt_long(argc, argv, "Kf", long_options,
&long_index);
Expand Down Expand Up @@ -216,7 +216,7 @@ static int cmd_scan_dev(int argc, char **argv)
int long_index;
static const struct option long_options[] = {
{ "all-devices", no_argument, NULL, 'd'},
{ 0, 0, 0, 0 },
{ NULL, 0, NULL, 0}
};
int c = getopt_long(argc, argv, "d", long_options,
&long_index);
Expand Down Expand Up @@ -514,6 +514,7 @@ int cmd_device_usage(int argc, char **argv)
{ "iec", no_argument, NULL, GETOPT_VAL_IEC},
{ "human-readable", no_argument, NULL,
GETOPT_VAL_HUMAN_READABLE},
{ NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "bhHkmgt", long_options,
&long_index);
Expand Down
1 change: 1 addition & 0 deletions cmds-fi-disk_usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ int cmd_filesystem_usage(int argc, char **argv)
{ "iec", no_argument, NULL, GETOPT_VAL_IEC},
{ "human-readable", no_argument, NULL,
GETOPT_VAL_HUMAN_READABLE},
{ NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "bhHkmgtT", long_options,
&long_index);
Expand Down
3 changes: 2 additions & 1 deletion cmds-filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static int cmd_filesystem_df(int argc, char **argv)
{ "iec", no_argument, NULL, GETOPT_VAL_IEC},
{ "human-readable", no_argument, NULL,
GETOPT_VAL_HUMAN_READABLE},
{ NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "bhHkmgt", long_options,
&long_index);
Expand Down Expand Up @@ -841,7 +842,7 @@ static int cmd_show(int argc, char **argv)
static const struct option long_options[] = {
{ "all-devices", no_argument, NULL, 'd'},
{ "mounted", no_argument, NULL, 'm'},
{ NULL, no_argument, NULL, 0 },
{ NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "dm", long_options,
&long_index);
Expand Down
2 changes: 1 addition & 1 deletion cmds-qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static int cmd_qgroup_show(int argc, char **argv)
{"iec", no_argument, NULL, GETOPT_VAL_IEC},
{ "human-readable", no_argument, NULL,
GETOPT_VAL_HUMAN_READABLE},
{0, 0, 0, 0}
{ NULL, 0, NULL, 0 }
};
c = getopt_long(argc, argv, "pcreFf",
long_options, &option_index);
Expand Down

0 comments on commit 34c2889

Please sign in to comment.