[Olsr-dev] [PATCH v1 000/115] Merge common code from jsoninfo and txtinfo
Ferry Huberts
(spam-protected)
Thu Dec 3 12:50:57 CET 2015
I tried that and it didn't compile.
Must have made a typo.
Anyway, it's fixed now.
And I've also simplified the determine_action function.
On 03/12/15 12:24, Henning Rogge wrote:
> On Thu, Dec 3, 2015 at 12:19 PM, Ferry Huberts <(spam-protected)> wrote:
>> Pushed with 4 follow-up patches:
>>
>> b446f0c info: minor reordering in send_info to reflect SIW_x order
>> 2172bce info: simplify use of the functions table
>> e493863 txtinfo: simplify setup of the functions table
>> cac9b49 jsoninfo: simplify setup of the functions table
>
> already better, but we can simplify the function calls even more...
>
> What do you think about a change like this?
>
> diff --git a/lib/info/olsrd_info.c b/lib/info/olsrd_info.c
> index 085926775fdb..37773263802f 100644
> --- a/lib/info/olsrd_info.c
> +++ b/lib/info/olsrd_info.c
> @@ -81,7 +81,7 @@ static unsigned int determine_action(char *requ) {
> if (!functions->is_command)
> return 0;
>
> - if ((*functions->is_command)(requ, SIW_OLSRD_CONF))
> + if (functions->is_command(requ, SIW_OLSRD_CONF))
> return SIW_OLSRD_CONF;
>
> if ((*functions->is_command)(requ, SIW_ALL))
>
> Henning
>
--
Ferry Huberts
More information about the Olsr-dev
mailing list