AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20080307174955.0e250b7d@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<jobi.ariyamannil@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 7 Mar 2008 17:51:49 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Jobi Ariyamannil <jobi.ariyamannil@onstor.com>
Subject: code review-lette
Message-ID: <20080307175149.38e2a6ce@ripper.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi J-man,

Can you look at this diff and tell me if it's all right?  I am
completely unfamiliar with this macro or this code.  Kumar says the
original code only works if the compiler 8-byte aligns the buffer
'entry', and it doesn't on Linux.  He says the second version of the
code fixes the problem.

Thanks,

a


diff nfx-tree/code/sm-file/filesh.c /homes/kumarv/work/dev/nfx-tree/code/sm-file/filesh.c
940,941c940,942
<         loop += ((uint32)FS_READDIRENH_NEXT_ENTRY_PTR(entry, entry->nameLen, entry->aliasLen) -
<                  (uint32)entry);
---
>         /* Calculate the offset to next directory entry record in the buffer.
>          */
>         loop += ((uint32)FS_READDIRENH_NEXT_ENTRY_PTR(0, entry->nameLen, entry->aliasLen));

