[sane-devel] hp5400_internal.c rintf()

der Mouse mouse@Rodents.Montreal.QC.CA
Tue, 29 Apr 2003 20:06:58 -0400 (EDT)

>>>     int bpp = (int) (float) htonl (res.transfersize) / pixels + 0.5);
> Although this might yield the same result, but are you sure you don't
> mean ntohl() instead of htonl()?

I suspect you really mean be32toh() - but note that I haven't read the
code in its full context.  If you do, and you're using htonl() for the
sake of compatability with systems that don't have be32toh() and
compatriots, then (a) it doesn't much matter whether you use ntohl or
htonl, since neither one is what you really mean and both perform the
same function, and (b) I'd recommend using be32toh() in the code and
defining it as htonl() in a compatability header as needed.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B