client/advertising: Fixes errors found by scan-build
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 22 Jun 2022 18:16:18 +0000 (11:16 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit474462a5194330887223da520226d60298ff6d34
tree15bf0d92689774c3c5364fcb2378e85ff9517739
parent1019084fc36163f9fa86bea5a1d91ab4d4506902
client/advertising: Fixes errors found by scan-build

This fixes the following errors:

client/advertising.c:129:4: warning: Value stored to 'n' is never read
[deadcode.DeadStores]
                        n = sizeof(str) - 1;
                        ^   ~~~~~~~~~~~~~~~
client/advertising.c:1012:25: warning: Dereference of null pointer
(loaded from variable 'min') [core.NullDereference]
        if (ad.min_interval != *min) {
                               ^~~~

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
client/advertising.c