diff mbox series

[BlueZ,v2,4/9] advertising: parse_min_interval: reset min_interval if iter is NULL

Message ID 20220923145602.25872-5-ceggers@arri.de (mailing list archive)
State Accepted
Commit abfb3a807c39ba577f1ed4f12a54c0f2eed2a96c
Headers show
Series properties_changed: check for NULL iterator | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint fail [BlueZ,v2,4/9] advertising: parse_min_interval: reset min_interval if iter is NULL 1: T1 Title exceeds max length (82>80): "[BlueZ,v2,4/9] advertising: parse_min_interval: reset min_interval if iter is NULL"

Commit Message

Christian Eggers Sept. 23, 2022, 2:55 p.m. UTC
Set property to its default value (as done in all other methods listed
in parsers[]).
---
 src/advertising.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/advertising.c b/src/advertising.c
index 6d8d06edd34f..fbfd90b4e300 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1087,8 +1087,10 @@  static bool parse_min_interval(DBusMessageIter *iter,
 	if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL))
 		return true;
 
-	if (!iter)
+	if (!iter) {
+		client->min_interval = 0;
 		return false;
+	}
 
 	if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT32)
 		return false;