From 4feac2ea35ae0f4ea7d71ff0ae1bf5871a703c03 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 12 Mar 2014 20:47:39 -0400 Subject: [PATCH] Rename ifchd_cmd_str() to ifchd_cmd_bytes() as it can handle byte sequences without a terminating nul. --- ndhc/ifchange.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ndhc/ifchange.c b/ndhc/ifchange.c index c018e08..5831cee 100644 --- a/ndhc/ifchange.c +++ b/ndhc/ifchange.c @@ -114,8 +114,8 @@ static int ifchd_cmd_iplist(char *buf, size_t buflen, char *optname, return buf - obuf; } -static int ifchd_cmd_str(char *buf, size_t buflen, char *optname, - uint8_t *optdata, ssize_t optlen) +static int ifchd_cmd_bytes(char *buf, size_t buflen, char *optname, + uint8_t *optdata, ssize_t optlen) { char *obuf = buf; if (buflen < strlen(optname) + optlen + 3) @@ -143,8 +143,8 @@ static int ifchd_cmd(char *buf, size_t buflen, uint8_t *optdata, IFCHD_SW_CMD(WINS, iplist); IFCHD_SW_CMD(ROUTER, ip); IFCHD_SW_CMD(TIMEZONE, s32); - IFCHD_SW_CMD(HOSTNAME, str); - IFCHD_SW_CMD(DOMAIN, str); + IFCHD_SW_CMD(HOSTNAME, bytes); + IFCHD_SW_CMD(DOMAIN, bytes); IFCHD_SW_CMD(IPTTL, u8); IFCHD_SW_CMD(MTU, u16); default: