bectl(8): initialize reverse earlier

This turns into a warning in GCC 4.2 that 'reverse' may be used
uninitialized in this function. While I don't immediately see where it's
deciding this from (there's only two paths that make column != NULL, and
they both set reverse), initializing reverse earlier is good for clarity.

MFC after:	3 days
This commit is contained in:
Kyle Evans 2019-09-09 18:17:30 +00:00
parent ca847845e3
commit a58f19e687
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352092

View File

@ -412,6 +412,7 @@ bectl_cmd_list(int argc, char *argv[])
props = NULL;
printed = 0;
bzero(&pc, sizeof(pc));
reverse = false;
while ((opt = getopt(argc, argv, "aDHsc:C:")) != -1) {
switch (opt) {
case 'a':
@ -463,10 +464,8 @@ bectl_cmd_list(int argc, char *argv[])
}
/* List boot environments in alphabetical order by default */
if (column == NULL) {
if (column == NULL)
column = strdup("name");
reverse = false;
}
prop_list_sort(props, column, reverse);