|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [patch] fix void* arithmetic
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
|
|
|
|
|