+ 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:
Yaroslav Tykhiy 2006-11-27 17:24:36 +00:00
parent 9540596e83
commit 6549e8c62e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164679

View File

@ -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