Use the standard defines for ipv4 printable address max string length.

This commit is contained in:
Nicholas J. Kain 2014-03-09 13:51:49 -04:00
parent d7ea5d9b0d
commit c4f09b1a9a

View File

@ -28,6 +28,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <arpa/inet.h>
#include "ifchd-defines.h" #include "ifchd-defines.h"
#include "log.h" #include "log.h"
@ -76,9 +77,9 @@
static void perform_ip4set(struct ifchd_client *cl, const char *buf, static void perform_ip4set(struct ifchd_client *cl, const char *buf,
size_t len) size_t len)
{ {
char ip4_addr[16]; char ip4_addr[INET_ADDRSTRLEN];
char ip4_subnet[16]; char ip4_subnet[INET_ADDRSTRLEN];
char ip4_bcast[16]; char ip4_bcast[INET_ADDRSTRLEN];
const char *p = buf; const char *p = buf;
const char *pe = p + len; const char *pe = p + len;
const char *eof = pe; const char *eof = pe;