Re: [PATCH 12/16] Staging: quickstart: Use list.h API for buttons list

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

 



On Mon, Jan 09, 2012 at 11:23:31PM +0100, Szymon Janc wrote:
> +	list_for_each_entry(b, &buttons, list) {
> +		count += snprintf(buf + count, PAGE_SIZE - count, "%d\t%s\n",
> +							b->id, b->name);
> +
> +		if (count == PAGE_SIZE)

snprintf() returns the number of bytes which would have been used if
there were space so this test should be >= instead of ==.

> +			break;
>  	}

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux