[Dnsmasq-discuss] Patch: Add --ping-timeout option
Simon Kelley
simon at thekelleys.org.uk
Thu May 17 11:45:16 BST 2012
On 16/05/12 20:00, Matthias Andree wrote:
> What is the purpose of casting stuff to float type explicitly (see
> quoted part below)?
>
> difftime() returns double, so the comparison arguments will be
> type-promoted to "double" anyways, no matter if you provide float, or
> integer. (This applies equally to the original code, not just the new
> code.)
The same reason that some expressions have redundant parentheses in, it
allows someone reading the code to see exactly what's being done without
knowing the intricacies of the compiler's precedence/type promotion
rules. I make no comment on whether the author of this code needs such
aids.....
>
> Regarding the option numbering in src/option.c, I'd propose to go with
> enum rather than #define. Doing so exposes the symbols in debuggers.
That's a sensible suggestion.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list