[sane-devel] hp5400_internal.c rintf()

der Mouse mouse at Rodents.Montreal.QC.CA
Wed Apr 30 01:06:58 BST 2003


>>>     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 at rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



More information about the sane-devel mailing list