Coda File System

which one is correct?

From: <u-codalist-z149_at_aetey.se>
Date: Wed, 30 Jul 2014 14:14:44 +0200
Looking at two very similar code snippets, like cut-n-paste
but yet different:

venusvol.cc:
                /* Make multiple copies of the IN/OUT and OUT parameters. */
                int ph_ix; unsigned long ph;
                ph = m->GetPrimaryHost(&ph_ix);

fso_cfscalls0.cc:
            /* Make multiple copies of the IN/OUT and OUT parameters. */
            int ph_ix; unsigned long ph;
            ph = ntohl(m->GetPrimaryHost(&ph_ix)->s_addr);

I wonder whether both can be correct and whether one of the cases
is compensated by the corresponding miss on the server side
and will break for different endianness of a client and a server?

(Guessing that ntohl() is necessary and was forgotten in one of the cases)

Leaving this [lack of] conversion as-is, as I only touch the client side.

Rune
Received on 2014-07-30 08:15:10