This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libio: use PTR_MANGLE/PTR_DEMANGLE for FILE vtables


On 23 May 2016 13:02, Kees Cook wrote:
> --- a/libio/libioP.h
> +++ b/libio/libioP.h
> +static inline void
> +__mangle_vtable(const struct _IO_jump_t **vtable, const struct _IO_jump_t *table)

any reason to not use a name like "_IO_mangle_vtable" ?

GNU style says to put a space before the (

> +{
> +    struct _IO_jump_t *ptr = (struct _IO_jump_t *)table;
> +#ifndef USE_COMPAT_LIBIO
> +    PTR_MANGLE (ptr);
> +#endif
> +    *vtable = ptr;
> +}

GNU style says indent with 2 spaces rather than 4

otherwise, lgtm
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]