Several unnecessary NULL pointer checks existed in unit/test-dhcp.c.
The pointers in question were actually arrays visible to the compiler.
Remove those NULL pointer checks to address "always true" warnings
exhibited by the Clang C compiler.
---
unit/test-dhcp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/unit/test-dhcp.c b/unit/test-dhcp.c
index 28504fe..49fc9f3 100644
--- a/unit/test-dhcp.c
+++ b/unit/test-dhcp.c
@@ -177,13 +177,13 @@ static struct dhcp_message *create_message(const struct option_test
*test,
opt[2] = 83;
opt[3] = 99;
- if (test->options && test->len)
+ if (test->len)
memcpy(&opt[4], test->options, test->len);
- if (test->file && test->filelen <= 128)
+ if (test->filelen <= 128)
memcpy(&message->file, test->file, test->filelen);
- if (test->sname && test->snamelen <= 64)
+ if (test->snamelen <= 64)
memcpy(&message->sname, test->sname, test->snamelen);
if (out_len)
--
2.17.1