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

Szymon Janc szymon at janc.net.pl
Wed Jan 11 17:47:50 UTC 2012


Hi,

> > +	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;
> > 
> >  	}

Yes, I'll fix that. 

Thx

-- 
Szymon K. Janc
szymon at janc.net.pl




More information about the devel mailing list