+ WARNS=4 reminds that nlist.n_name isn't const.
+ Use C99 initializers to be WARNS-clean. + The last element in a namelist should have its n_name set to NULL, not to an empty string.
This commit is contained in:
parent
23e0bb44c9
commit
cf3ea4f2b8
@ -146,12 +146,14 @@ static const char *miblist[] = {
|
||||
"net.inet.udp.pcblist"
|
||||
};
|
||||
|
||||
static char tcb[] = "tcb", udb[] = "udb";
|
||||
|
||||
struct nlist namelist[] = {
|
||||
#define X_TCB 0
|
||||
{ "tcb" },
|
||||
{ .n_name = tcb },
|
||||
#define X_UDB 1
|
||||
{ "udb" },
|
||||
{ "" },
|
||||
{ .n_name = udb },
|
||||
{ .n_name = NULL },
|
||||
};
|
||||
|
||||
int
|
||||
|
Loading…
x
Reference in New Issue
Block a user