diff --git a/subsys/net/lib/zoap/zoap_link_format.c b/subsys/net/lib/zoap/zoap_link_format.c index dbf1873d412..8ed56b7aa1d 100644 --- a/subsys/net/lib/zoap/zoap_link_format.c +++ b/subsys/net/lib/zoap/zoap_link_format.c @@ -272,7 +272,7 @@ static int format_uri(const char * const *path, struct net_buf *buf, return 0; } - for (p = path; p && *p; ) { + for (p = path; *p; ) { u16_t path_len = strlen(*p); add_to_net_buf(buf, *p, path_len, @@ -313,7 +313,7 @@ static int format_attributes(const char * const *attributes, goto terminator; } - for (attr = attributes; attr && *attr; ) { + for (attr = attributes; *attr; ) { int attr_len = strlen(*attr); add_to_net_buf(buf, *attr, attr_len, @@ -539,7 +539,7 @@ static int format_uri(const char * const *path, struct net_buf *buf) str = net_buf_add(buf, sizeof(prefix) - 1); strncpy(str, prefix, sizeof(prefix) - 1); - for (p = path; p && *p; ) { + for (p = path; *p; ) { u16_t path_len = strlen(*p); str = net_buf_add(buf, path_len); @@ -568,7 +568,7 @@ static int format_attributes(const char * const *attributes, goto terminator; } - for (attr = attributes; attr && *attr; ) { + for (attr = attributes; *attr; ) { int attr_len = strlen(*attr); str = net_buf_add(buf, attr_len);