summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@intel.com>2016-10-03 17:49:33 -0300
committerAnas Nashif <nashif@linux.intel.com>2016-10-04 12:29:07 +0000
commit75d7147fa4459025d09137b70161274031651918 (patch)
treeb5ad5609197d36ba8b4eb4669b8710cc10d341cb /lib
parente965119cd9a1ad24ccfaf9b27f36552686b85365 (diff)
iot/zoap: Fix comparing pointers of different signedness
strncmp() expects pointers of type 'char *', we could cast option.value to 'char *', but we can use memcmp() instead, which has the benefit of being simpler. Change-Id: I8c4ee4401712f3617c134d8e5b6d84e8f5cc4e1d Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/iot/zoap/zoap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/iot/zoap/zoap.c b/lib/iot/zoap/zoap.c
index 313a24ec9..d50b00410 100644
--- a/lib/iot/zoap/zoap.c
+++ b/lib/iot/zoap/zoap.c
@@ -504,7 +504,7 @@ static bool uri_path_eq(const struct zoap_packet *pkt,
return false;
}
- if (strncmp(options[i].value, path[i], len)) {
+ if (memcmp(options[i].value, path[i], len)) {
return false;
}
}