From: Roy Marples Date: Thu, 2 Oct 2014 10:51:32 +0000 (+0000) Subject: Fix some errors X-Git-Tag: v6.5.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cb87923ac6c28252de4f475fcc4bb0d179ef959;p=thirdparty%2Fdhcpcd.git Fix some errors --- diff --git a/dhcp-common.c b/dhcp-common.c index 1f2e6c27..72fdceaa 100644 --- a/dhcp-common.c +++ b/dhcp-common.c @@ -465,11 +465,11 @@ print_string(char *dst, size_t len, int type, const uint8_t *data, size_t dl) { errno = EINVAL; if (c == '\\') { - if (len == 0 || len == 1) { - errno = ENOSPC; - return -1; - } if (dst) { + if (len == 0 || len == 1) { + errno = ENOSPC; + return -1; + } *dst++ = '\\'; *dst++ = '\\'; len -= 2; } diff --git a/dhcp6.c b/dhcp6.c index 3ed743da..44a6386a 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -3401,7 +3401,7 @@ delegated: do *v++ = *sap; - while (*sap++ != '\0'); + while (*++sap != '\0'); *v++ = ' '; } }