Re: [PATCH v2 1/4] Bluetooth: Add option for SCO socket mode

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

 



Hi Frédéric,

On Wed, Jan 30, 2013, Frédéric Dalleau wrote:
> +#define SCO_MODE_CVSD		0x00
> +#define SCO_MODE_TRANSPARENT	0x01
> +#define SCO_MODE_MAX            0x02

If you're going to have a MAX define better make it the real maximum
instead of max + 1.

> +		if (opts.mode >= SCO_MODE_MAX) {
> +			err = -EINVAL;
> +			break;
> +		}

It makes this check also look a bit nicer since you use > instead of >=

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