Re: [PATCH BlueZ 04/16] AVRCP: Don't respond with errors when no player is registered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Mon, Oct 15, 2012, Luiz Augusto von Dentz wrote:
> +static void *player_get_metadata(struct avrcp_player *player, uint32_t attr)
> +{
> +	if (player != NULL)
> +		return player->cb->get_metadata(attr, player->user_data);
> +
> +	if (attr == AVRCP_MEDIA_ATTRIBUTE_TITLE)
> +		return "";

This is quite messed up. Using void pointers like that just obfuscates
what the code is doing. After a quick look at current git it seems to me
like struct metadata_value from media.c should be made public and that
should be the return type of this function instead of doing void pointer
magic.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux