Re: [PATCH obexd v2 5/8] client: terminate queued transfers properly

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

 



Hi Mikel,

On Tue, Feb 21, 2012, Mikel Astiz wrote:
> +static gint pending_transfer_cmptransfer(gconstpointer a, gconstpointer b)
> +{
> +	const struct pending_request *p = a;
> +	const struct obc_transfer *transfer = b;
> +
> +	return p->transfer < transfer ? -1 : (p->transfer > transfer ? 1 : 0);
> +}

Please rewrite this conditional statement into something more readable.
One has to spend much too much time trying to figure out what it does.
Since you're not using this for sorting but just for finding a specific
transfer you could just make it something like:

	if (p->transfer == transfer)
		return 0;

	return -1;

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