Skip to content

Commit

Permalink
fix initialization of systatcs sentinel in commands.c
Browse files Browse the repository at this point in the history
Repairs the following compile-time warning:

nsh/commands.c:403:17: warning: suggest braces around initialization
of subobject [-Wmissing-braces]                                             
        { 0, 0, 0, 0 }                                                          
                ^~~~                                                                            {   }
  • Loading branch information
stspdotname committed Oct 28, 2024
1 parent 15a2fab commit 809a0cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ struct prot1 ldcs[] = {
{ LDAPCTL, "stats", NULL } },
{ 0, 0, { 0 } }
};

struct prot1 systatcs[] = {
{ "interface", "Interface",
{ SYSTAT, "-d 3", "ifstat", NULL, NULL, NULL } },
Expand Down Expand Up @@ -400,11 +401,9 @@ struct prot1 systatcs[] = {
{ SYSTAT, "-d 3", "malloc", NULL, NULL, NULL } },
{ "bucket", "Kernel malloc bucket",
{ SYSTAT, "-d 3", "bucket", NULL, NULL, NULL } },
{ 0, 0, 0, 0 }
{ 0, 0, { 0 } }
};



extern struct prot1 bgcs[];

/* show yyy zzz */
Expand Down

0 comments on commit 809a0cb

Please sign in to comment.