git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
fs
/
lockd
/
host.c
diff --git
a/fs/lockd/host.c
b/fs/lockd/host.c
index
fc4f414
..
54f25ae
100644
(file)
--- a/
fs/lockd/host.c
+++ b/
fs/lockd/host.c
@@
-104,11
+104,7
@@
nlm_lookup_host(int server, struct sockaddr_in *sin,
memset(host, 0, sizeof(*host));
addr = sin->sin_addr.s_addr;
memset(host, 0, sizeof(*host));
addr = sin->sin_addr.s_addr;
- sprintf(host->h_name, "%d.%d.%d.%d",
- (unsigned char) (ntohl(addr) >> 24),
- (unsigned char) (ntohl(addr) >> 16),
- (unsigned char) (ntohl(addr) >> 8),
- (unsigned char) (ntohl(addr) >> 0));
+ sprintf(host->h_name, "%u.%u.%u.%u", NIPQUAD(addr));
host->h_addr = *sin;
host->h_addr.sin_port = 0; /* ouch! */
host->h_addr = *sin;
host->h_addr.sin_port = 0; /* ouch! */