summaryrefslogtreecommitdiffstats
path: root/dhcp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-07-21 21:48:17 +0000
committerRoy Marples <roy@marples.name>2008-07-21 21:48:17 +0000
commitb6db29122a7eec62654102ddb5947253fedb9c4b (patch)
treec2c74a8a6ea3c5db70a9aa584bded59dc2d6eed1 /dhcp.c
parent681b6eeac74c38993db4ca3bb66cb30cad81b278 (diff)
downloaddhcpcd-b6db29122a7eec62654102ddb5947253fedb9c4b.tar.xz
Fix valgrind errors, and report correct type.
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c4
1 files changed, 2 insertions, 2 deletions
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;