On Thu, 2012-12-06 at 15:55 +0100, Mikel Astiz wrote:
> From: Mikel Astiz <[email protected]>
> 
> Refactor the code to use an array of states instead of independent
> member fields, avoiding duplicated code and improving readability.
> ---
>  src/modules/bluetooth/bluetooth-util.c          | 81 
> ++++++++++++++-----------
>  src/modules/bluetooth/bluetooth-util.h          | 13 +---
>  src/modules/bluetooth/module-bluetooth-device.c | 59 +++++-------------
>  3 files changed, 62 insertions(+), 91 deletions(-)
> 
> diff --git a/src/modules/bluetooth/bluetooth-util.c 
> b/src/modules/bluetooth/bluetooth-util.c
> index 6f784d1..4986501 100644
> --- a/src/modules/bluetooth/bluetooth-util.c
> +++ b/src/modules/bluetooth/bluetooth-util.c
> @@ -93,6 +93,24 @@ pa_bt_audio_state_t pa_bt_audio_state_from_string(const 
> char* value) {
>      return PA_BT_AUDIO_STATE_INVALID;
>  }
>  
> +static bool pa_bt_audio_profile_from_interface(const char *interface, enum 
> profile *p) {

I'd prefer int return value to represent failure.

It's a static function, there's no need for the "pa_bt_" prefix.

NULL parameter checking is missing.

I'll fix these minor issues myself, no need to resend.

-- 
Tanu

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to