From: Roy Marples Date: Mon, 21 Jul 2008 21:48:17 +0000 (+0000) Subject: Fix valgrind errors, and report correct type. X-Git-Tag: v4.0.2~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6db29122a7eec62654102ddb5947253fedb9c4b;p=thirdparty%2Fdhcpcd.git Fix valgrind errors, and report correct type. --- diff --git a/dhcp.c b/dhcp.c index 3d6a29d9..533b29d9 100644 --- a/dhcp.c +++ b/dhcp.c @@ -295,7 +295,7 @@ get_option(const struct dhcp_message *dhcp, uint8_t opt, int *len, int *type) } exit: - if (valid_length(o, bl, type) == -1) { + if (valid_length(opt, bl, type) == -1) { errno = EINVAL; return NULL; } @@ -583,7 +583,7 @@ decode_rfc3361(int dl, const uint8_t *data) char * get_option_string(const struct dhcp_message *dhcp, uint8_t option) { - int type; + int type = 0; int len; const uint8_t *p; char *s;