[Pdns-dev] Re: Another SPARC and endian problem

bert hubert ahu at ds9a.nl
Mon Sep 8 21:16:09 CEST 2003

On Mon, Sep 08, 2003 at 08:11:31PM +0200, Christof Meerwald wrote:

> > dnspacket.cc/expand()/line 109:
> > unsigned int labelOffset=(n&~0xc0)*256+ (int)*(unsigned char *)p;
> I would agree if the original code would read
>   unsigned int labelOffset=(n&~0xc0)*256+ *(int *)p;
> But, "(int)*(unsigned char *)p" is quite different from "*(int *)p".

Christof is right.

http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

More information about the Pdns-dev mailing list