lkml.org 
[lkml]   [2010]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/minix: bugfix, number of indirect block ptrs per block depends on block size
On Wed, May 26, 2010 at 11:54:43PM +0200, Jan Kara wrote:
> > - } else if ((block -= 7) < 256) {
> > - offsets[n++] = 7;
> > + } else if ((block -= DIRCOUNT) < INDIRCOUNT(sb)) {
> This modification of 'block' in the if condition is a blatant violation
> of the kernel coding style.

The hell it is. [...said the guy who'd written it that way in the first place]
It _is_ idiomatic C for that kind of thing ("we've got several adjacent ranges,
find which one had we hit and how far from its start").


\
 
 \ /
  Last update: 2010-05-27 18:03    [W:0.065 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site