Valgrind reports with D-Bus API

Witold Sowa witold.sowa
Wed Jan 6 03:15:58 PST 2010


Jouni Malinen pisze:
> Fixed.. Extraneous semicolons can be dangerous:
> 
> 
> --- a/wpa_supplicant/dbus/dbus_new.c
> +++ b/wpa_supplicant/dbus/dbus_new.c
> @@ -757,7 +757,7 @@ static void wpas_dbus_register(struct wpa_dbus_object_desc *obj_desc,
>  	obj_desc->properties = properties;
>  	obj_desc->signals = signals;
>  
> -	for (n = 0; properties && properties->dbus_property; properties++);
> +	for (n = 0; properties && properties->dbus_property; properties++)
>  		n++;
>  
>  	obj_desc->prop_changed_flags = os_zalloc(n);
> 
I remember how it happened. This line looked like that in the first place:
for (n = 0; properties && properties->dbus_property; properties++, n++);
but empty loop looked strange to me si I decided to move the n
incrementation inside the loop. And I forgot about semicolon.
I'll check changes with valgrind before committing it next time.

Regards,
Witek.



More information about the Hostap mailing list