From mboxrd@z Thu Jan 1 00:00:00 1970 From: steven.moix at axianet.ch (Steven Moix) Date: Mon, 28 Apr 2008 18:33:10 +0200 Subject: Broken dbus In-Reply-To: <48149637.9070204@hp.com> References: <20080427.054722.1745805393.furutaka@jb3.so-net.ne.jp> <4813A749.9020900@hp.com> <1209283765.4324.11.camel@HP6710.axianet.ch> <20080427.174643.467975248.furutaka@jb3.so-net.ne.jp> <48148D27.9010708@hp.com> <48149637.9070204@hp.com> Message-ID: <1209400390.2671.0.camel@HP6710.axianet.ch> Heh! Thanks for this very complete and clear explanation :) Steven On Sun, 2008-04-27 at 11:05 -0400, Jay Estabrook wrote: > Sigh... > > I knew it was too early on a Sunday morning for this... ;-} > > Estabrook, Jay wrote: > > > > The poor programming practice (hal) arises from assuming that all > > architectures have a natural boundary of 32-bits. Something like > > the following are indicative: > > > > pointer = (void *)((((char *)address) + 3) & ~3); > > Should be: > > pointer = (void *)((((char *)address) + 4) & ~3); > > which rounds UP to the next 32-bit natural boundary. > > > > > Better is: > > > > #define SZM (sizeof(void*)-1) > > pointer = (void *)((((char *)address) + SZM) & ~SZM); > > And this should be: > > #define SZ (sizeof(void*)) > #define SZM (SZ-1) > pointer = (void *)((((char *)address) + SZ) & ~SZM); > > which also rounds UP. > > Now back to the funny pages... ;-} > > --Jay++ > > _______________________________________________ > axp-list mailing list > axp-list at redhat.com > https://www.redhat.com/mailman/listinfo/axp-list