lkml.org 
[lkml]   [2009]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectCheckpatch false positive?
  Hi,

I've used checkpatch.pl to verify one of my patches. It complains:

ERROR: trailing statements should be on next line
#167: FILE: fs/quota/quota_tree.c:249:
+ for (i = 0, ddquot = buf + sizeof(struct qt_disk_dqdbheader);
[...]
i++, ddquot += info->dqi_entry_size);

But the code looks like:
for (i = 0, ddquot = buf + sizeof(struct qt_disk_dqdbheader);
i < qtree_dqstr_in_blk(info) && !qtree_entry_unused(info, ddquot);
i++, ddquot += info->dqi_entry_size);

Which is IMHO correct. Maybe it's because the for has actually empty body
and the ; is at the end of the line with for. But I didn't find anything in
CodingStyle that would forbid
for (...);
and
for (...)
;
Looks a bit strange.

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2009-01-27 16:51    [W:0.067 / U:2.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site