Re: [PATCH] init and extra checking fixups

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

 



Hi Steve,

On Sat, Sep 26, 2009 at 1:37 PM, Steve Grubb <sgrubb@xxxxxxxxxx> wrote:
> diff -urp bluez-4.54.orig/audio/control.c bluez-4.54/audio/control.c
> --- bluez-4.54.orig/audio/control.c     2009-09-26 08:43:56.000000000 -0400
> +++ bluez-4.54/audio/control.c  2009-09-26 11:24:04.000000000 -0400
> @@ -472,7 +472,7 @@ static gboolean control_cb(GIOChannel *c
>        struct avrcp_header *avrcp;
>        int ret, packet_size, operand_count, sock;
>
> -       if (!(cond | G_IO_IN))
> +       if (!(cond & G_IO_IN))
>                goto failed;

I don't think this is actually right, if we change it to AND operation
it would mean we won't process any other error condition if it happens
together with G_IO_IN, but still the OR seems wrong here, normally we
use the following check which I believe is more appropriate:


	if (cond & (G_IO_HUP | G_IO_ERR))
		goto failed;

-- 
Luiz Augusto von Dentz
Engenheiro de Computação
--
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