From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aron Griffis Subject: Re: [patch] fix void* arithmetic Date: Tue, 29 Aug 2006 16:35:31 -0400 Message-ID: <20060829203531.GH12590@fc.hp.com> References: <1156883088.29858.69.camel@basalt.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <1156883088.29858.69.camel@basalt.austin.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: xen-devel , Ian Campbell List-Id: xen-devel@lists.xenproject.org Hollis Blanchard wrote: [Tue Aug 29 2006, 04:24:48PM EDT] > +#define ELFNOTE_NAME(_n_) ((void*)((char*)(_n_) + sizeof(*(_n_)))) > +#define ELFNOTE_DESC(_n_) (((void*)((char*)ELFNOTE_NAME(_n_) + (((_n_)->namesz+3)&~3)))) > +#define ELFNOTE_NEXT(_n_) (((void*)((char*)ELFNOTE_DESC(_n_) + (((_n_)->descsz+3)&~3)))) Too many parens on the latter two? I think this is the same: #define ELFNOTE_NAME(_n_) ((void*)((char*)(_n_) + sizeof(*(_n_)))) #define ELFNOTE_DESC(_n_) ((void*)((char*)ELFNOTE_NAME(_n_) + (((_n_)->namesz+3)&~3))) #define ELFNOTE_NEXT(_n_) ((void*)((char*)ELFNOTE_DESC(_n_) + (((_n_)->descsz+3)&~3))) Aron