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] glob: Avoid copying the d_name field of struct dirent [BZ #19779]


On 03/11/2016 11:00 PM, Paul Eggert wrote:
> I merely read the patch. Comments:
> 
>> +static void
>> +convert_dirent (const struct dirent *source, struct abstract_dirent
> *target)
> 
> Since this is all inlined, how about if making it a pure function, with
> a signature like this instead?
> 
> static struct abstract_dirent
> convert_dirent (struct dirent const *source)
> 
> That should be a bit cleaner.

The file is in gnulib, I feared that gnulib has to support compilers
which cannot return structs.

> Otherwise, it looks good.

Thanks.

Florian


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