From 5fba7bbfa47ef5c03a28000252d06ec82405d461 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 12 Dec 2013 23:08:47 +0100 Subject: scan-build: silence some warnings test-fileio/test-strv: Use the streq_ptr to make build-scan not worry about passing in a null to a nonnull function. test-dhcp-option: Prevent a theoretical null pointer dereference --- src/libsystemd-dhcp/test-dhcp-option.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsystemd-dhcp') diff --git a/src/libsystemd-dhcp/test-dhcp-option.c b/src/libsystemd-dhcp/test-dhcp-option.c index e2a680064c..ac0b0a435a 100644 --- a/src/libsystemd-dhcp/test-dhcp-option.c +++ b/src/libsystemd-dhcp/test-dhcp-option.c @@ -198,6 +198,7 @@ static int test_options_cb(uint8_t code, uint8_t len, const uint8_t *option, *descpos = -1; } + assert(descpos); assert(*descpos != -1); optcode = descoption[*descpos]; -- cgit v1.2.3-54-g00ecf