[PATCH] glob: Avoid copying the d_name field of struct dirent [BZ #19779]
Roland McGrath
roland@hack.frob.com
Mon May 2 22:48:00 GMT 2016
Pretty much OK.
Please follow up quickly on making sure we are harmonized with gnulib.
> +# if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE
> + unsigned char type;
> +# endif
uint8_t seems better for something that is not a character.
> + struct readdir_result result = {NULL};
Put spaces around NULL, or just use {} (which has the same semantics).
> +#ifndef COMPILE_GLOB64
Ditto in the copy. Ick for having a copy. If it seems best to have a
copy, then at least put a comment on the copy saying it needs to match.
More information about the Libc-alpha
mailing list