On 8 January 2014 12:02, Martin Pieuchot <mpieuc...@nolizard.org> wrote:
> I find it really difficult to understand and work with the code of
> rtsock.c because of the following defines:
>
>
>         /* Sleazy use of local variables throughout file, warning!!!! */
>         #define dst    info.rti_info[RTAX_DST]
>         #define gate   info.rti_info[RTAX_GATEWAY]
>         ...
>
> But since this code is a mess, simply removing these defines makes it
> harder to understand.  So the diff below introduces other defines to
> make it clear that we manipulate a rt_addrinfo structure while
> preserving the readability:
>
>         #define rti_dst        rti_info[RTAX_DST]
>         #define rti_gate       rti_info[RTAX_GATEWAY]
>         ...
>
> I converted rtsock.c and route.c and there's no object change with this
> diff.  I'll happily convert the remaining files after putting this in.
>
> Comments, ok?
>

looks sane to me.  OK mikeb

Reply via email to