From d39ac3a94c522b1f1a83d553c833a9ebfd1fd765 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 8 Sep 2022 10:23:43 -0500 Subject: call-barring: Quiet GCC warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC src/call-barring.o In function ‘cb_lock_property_lookup’, inlined from ‘cb_set_property’ at src/call-barring.c:854:7: src/call-barring.c:776:18: error: ‘len’ may be used uninitialized [-Werror=maybe-uninitialized] 776 | property += len; | ~~~~~~~~~^~~~~~ src/call-barring.c: In function ‘cb_set_property’: src/call-barring.c:759:16: note: ‘len’ was declared here 759 | size_t len; | ^~~ --- src/call-barring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/call-barring.c b/src/call-barring.c index 845cbc38..7bd547c9 100644 --- a/src/call-barring.c +++ b/src/call-barring.c @@ -766,15 +766,15 @@ static gboolean cb_lock_property_lookup(const char *property, const char *value, prefix = bearer_class_to_string(i); len = strlen(prefix); - if (!strncmp(property, prefix, len)) + if (!strncmp(property, prefix, len)) { + property += len; break; + } } if (i > BEARER_CLASS_PAD) return FALSE; - property += len; - if (!strcmp(property, "Outgoing")) { start = CB_OUTGOING_START; end = CB_OUTGOING_END; -- cgit v1.2.1