lkml.org 
[lkml]   [1999]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: some dangling code in fs/ext2/namei.c, patch attached


On Sat, 18 Dec 1999 afei@jhu.edu wrote:

> fs/ext2/namei.c
> 279L:
> de1 = (struct ext2_dir_entry_2 *)((char *) de +
> EXT2_DIR_REC_LEN(de->name_len));
> de1->rec_len = cpu_to_le16(le16_to_cpu(de->rec_len) -
> EXT2_DIR_REC_LEN(de->name_len));
> de->rec_len =cpu_to_le16(EXT2_DIR_REC_LEN(de->name_len));
> de = de1;
> The line computes de->rec_len is not necessary, cause de is reset later on.

Please, learn C. In particular, pay attention to the topic "pointers".

> Patch attached. So far it is not fixed in 2.3 yet.

I think you mean "so far it is not broken". BTW, being able to pass C 101
_is_ prerequisite for playing with the kernel. Really.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.239 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site