[Olsr-dev] [PATCH v1 000/115] Merge common code from jsoninfo and txtinfo
Ferry Huberts
(spam-protected)
Thu Dec 3 11:44:58 CET 2015
I can do that as a follow-up patch, is that ok?
Did you finish review, it's not clear.
On 03/12/15 11:10, Henning Rogge wrote:
> Hi Ferry,
>
> just as a first comment, you have a strange pattern when dealing with
> function pointers...
>
> 1.) you don't need to use the & operator to initialize a function pointer
>
> variable = function_name;
>
> works fine.
>
> 2.) You don't need to do the strange (*xyz)(abc); pattern
>
> example... in olsrd_info.c, in the determine_action() function (line
> 80..) you can write:
>
> static unsigned int determine_action(char *requ) {
> if (!functions->is_command)
> return 0;
>
> if (functions->is_command(requ, SIW_OLSRD_CONF))
> return SIW_OLSRD_CONF;
>
> if (functions->is_command(requ, SIW_ALL))
> return SIW_ALL;
>
>
> This would improve the readability of the function pointer handling quite a bit.
>
> Henning
>
> On Wed, Dec 2, 2015 at 9:35 PM, Ferry Huberts <(spam-protected)> wrote:
>> I've also pushed the series as branch 'json-txt-merge'.
>>
>> For easier review,
>> using something like gitk with 'ignore space change' (hint)
>>
>> Ferry
>>
>>
>> --
>> Olsr-dev mailing list
>> (spam-protected)
>> https://lists.olsr.org/mailman/listinfo/olsr-dev
--
Ferry Huberts
More information about the Olsr-dev
mailing list