mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Get rid of the old constants which did not include the trailing NUL
and use the new constants which do.
This commit is contained in:
parent
26f9b263ae
commit
9d901d3b5f
3 changed files with 4 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ ListCmd(int ac, char **av)
|
|||
printf("There are %d total %snodes:\n",
|
||||
nlist->numnames, named_only ? "named " : "");
|
||||
for (k = 0; k < nlist->numnames; k++) {
|
||||
char path[NG_PATHLEN+1];
|
||||
char path[NG_PATHSIZ];
|
||||
char *av[3] = { "list", "-n", path };
|
||||
|
||||
snprintf(path, sizeof(path),
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ int csock, dsock;
|
|||
int
|
||||
main(int ac, char *av[])
|
||||
{
|
||||
char name[NG_NODELEN + 1];
|
||||
char name[NG_NODESIZ];
|
||||
int interactive = isatty(0) && isatty(1);
|
||||
FILE *fp = NULL;
|
||||
int ch, rtn = 0;
|
||||
|
|
@ -236,7 +236,7 @@ DoInteractive(void)
|
|||
/* Display any incoming data packet */
|
||||
if (FD_ISSET(dsock, &rfds)) {
|
||||
u_char buf[8192];
|
||||
char hook[NG_HOOKLEN + 1];
|
||||
char hook[NG_HOOKSIZ];
|
||||
int rl;
|
||||
|
||||
/* Read packet from socket */
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ MsgRead()
|
|||
u_char buf[2 * sizeof(struct ng_mesg) + BUF_SIZE];
|
||||
struct ng_mesg *const m = (struct ng_mesg *)buf;
|
||||
struct ng_mesg *const ascii = (struct ng_mesg *)m->data;
|
||||
char path[NG_PATHLEN+1];
|
||||
char path[NG_PATHSIZ];
|
||||
|
||||
/* Get incoming message (in binary form) */
|
||||
if (NgRecvMsg(csock, m, sizeof(buf), path) < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue