X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Flockd%2Fmon.c;h=6fc1bebeec1df16419881b2018dbed2616ad5c15;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=de204b36bc341cfdc1fb04803093c5b8d435ab21;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index de204b36b..6fc1bebee 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -19,7 +19,7 @@ static struct rpc_clnt * nsm_create(void); -extern struct rpc_program nsm_program; +static struct rpc_program nsm_program; /* * Local NSM state @@ -140,7 +140,6 @@ static u32 * xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) { char buffer[20]; - u32 addr = ntohl(argp->addr); /* * Use the dotted-quad IP address of the remote host as @@ -148,8 +147,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) * hostname first for whatever remote hostname it receives, * so this works alright. */ - sprintf(buffer, "%d.%d.%d.%d", (addr>>24) & 0xff, (addr>>16) & 0xff, - (addr>>8) & 0xff, (addr) & 0xff); + sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(argp->addr)); if (!(p = xdr_encode_string(p, buffer)) || !(p = xdr_encode_string(p, system_utsname.nodename))) return ERR_PTR(-EIO); @@ -239,7 +237,7 @@ static struct rpc_version * nsm_version[] = { static struct rpc_stat nsm_stats; -struct rpc_program nsm_program = { +static struct rpc_program nsm_program = { .name = "statd", .number = SM_PROGRAM, .nrvers = sizeof(nsm_version)/sizeof(nsm_version[0]),