WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] fix void* arithmetic

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] fix void* arithmetic
From: Aron Griffis <aron@xxxxxx>
Date: Tue, 29 Aug 2006 16:35:31 -0400
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Delivery-date: Tue, 29 Aug 2006 13:36:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1156883088.29858.69.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Hollis Blanchard <hollisb@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <1156883088.29858.69.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel