bug in masked_match function

aono at cc.osaka-kyoiku.ac.jp aono at cc.osaka-kyoiku.ac.jp
Mon Apr 7 20:02:02 GMT 2003


In <3E8461A0.F8004B3C at goodrich.com>,
Andrew.Bird at goodrich.com wrote:

>>     I think the right solution is to revert the patch - i've knocked up
>> the following test program.
(snipped)
>> changing XOR to AND is incorrect
>> (ALLONES << atoi(slash + 1)) & ALLONES
>> 1111 1111 1000 0000 0000 0000 0000 0000

Oh, it shows I didn't test this situation (^^;;. It should
be (not well optimized):

(ALLONES << ( atoi(slash+1) < 32 ? 32 - atoi(slash+1) : 0)) & ALLONES

Anyway I'm glad Jerry modified this one (Thanks!). Sorry
for sending this reply too late.
----
Tomoki AONO	(aono at cc.osaka-kyoiku.ac.jp)


More information about the samba-technical mailing list