Discussion:
[Dnsmasq-discuss] [PATCH] Simplify options flags
Petr Mensik
2018-10-24 15:25:31 UTC
Permalink
Hi!

I have not managed it until dnsmasq 2.80 were out, but anyway. I have
some proposal to simplify handling of options bits. Static analysis
complains on compiler dead-code optimization. I propose having array
instead. It adds few defines. But it allows adding any bits to defines
and moving OPT_LAST. It will resize itself as required.

It might be possible to change unsigned int to unsigned long. It would
use 64 bit numbers on x86_64 machines. But I guess it might not be worth
that optimization.

Chances to get it merged?
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: ***@redhat.com PGP: 65C6C973
Simon Kelley
2018-10-24 21:39:35 UTC
Permalink
Post by Petr Mensik
Hi!
I have not managed it until dnsmasq 2.80 were out, but anyway. I have
some proposal to simplify handling of options bits. Static analysis
complains on compiler dead-code optimization. I propose having array
instead. It adds few defines. But it allows adding any bits to defines
and moving OPT_LAST. It will resize itself as required.
It might be possible to change unsigned int to unsigned long. It would
use 64 bit numbers on x86_64 machines. But I guess it might not be worth
that optimization.
Chances to get it merged?
Merged as is. a definite improvement.


Cheers,

Simon.
Petr Mensik
2018-10-25 08:12:14 UTC
Permalink
Thanks!
Post by Simon Kelley
Post by Petr Mensik
Hi!
I have not managed it until dnsmasq 2.80 were out, but anyway. I have
some proposal to simplify handling of options bits. Static analysis
complains on compiler dead-code optimization. I propose having array
instead. It adds few defines. But it allows adding any bits to defines
and moving OPT_LAST. It will resize itself as required.
It might be possible to change unsigned int to unsigned long. It would
use 64 bit numbers on x86_64 machines. But I guess it might not be worth
that optimization.
Chances to get it merged?
Merged as is. a definite improvement.
Cheers,
Simon.
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: ***@redhat.com PGP: 65C6C973
Loading...