#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <syslog.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
free(ncache);
icache = proto;
ncache = strdup(pe->p_name);
- strncpy(buf, pe->p_name, len - 1);
- buf[len - 1] = '\0';
+ strlcpy(buf, pe->p_name, len);
return buf;
}
snprintf(buf, len, "ipproto-%d", proto);