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] remove nested functions from elf/dl-load.c


>         * elf/dl-load.c
>         (add_path): New function broken out of _dl_rtld_di_serinfo.
>         (_dl_rtld_di_serinfo): Remove a nested function. Update call sites.

Two spaces between sentences.  Say "remove that" instead of "remove a".

> +struct add_path_args

This is not the arguments to the function so much as it's the state
relevant to the function.  So add_path_state seems like a better name.

>  {
> +  struct add_path_args p;
>    if (counting)
>      {
>        si->dls_cnt = 0;
>        si->dls_size = 0;
>      }
> +  p.counting = counting;
> +  p.idx = 0;
> +  p.allocptr = (char *) &si->dls_serpath[si->dls_cnt];
> +  p.si = si;

Use an initializing definition, and put that exactly where the previous
definitions of the shared locals were.  That is, after the if block and a
blank line.

The change is OK with those fixes.


Thanks,
Roland


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