summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 00:56:28 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-31 00:56:28 -0700
commitbe859405487324ed548f1ba11dc949b8230ab991 (patch)
tree3893ac2ce3b212b100d9e1e1e3e2fc1fa0c3f47f /fs/cifs
parent63779436ab4ad0867bcea53bf853b0004d7b895d (diff)
fs: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_spnego.c3
-rw-r--r--fs/cifs/connect.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 0e186cd20ad..359144c510b 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -121,8 +121,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
/* add the server address */
if (server->addr.sockAddr.sin_family == AF_INET)
- sprintf(dp, "ip4=" NIPQUAD_FMT,
- NIPQUAD(server->addr.sockAddr.sin_addr));
+ sprintf(dp, "ip4=%pI4", &server->addr.sockAddr.sin_addr);
else if (server->addr.sockAddr.sin_family == AF_INET6)
sprintf(dp, "ip6=%pi6", &server->addr.sockAddr6.sin6_addr);
else
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 71b7661e226..cd54fee3f05 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2058,8 +2058,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
rc = -ENOMEM;
else {
pSesInfo->server = srvTcp;
- sprintf(pSesInfo->serverName, "%u.%u.%u.%u",
- NIPQUAD(sin_server.sin_addr.s_addr));
+ sprintf(pSesInfo->serverName, "%pI4",
+ &sin_server.sin_addr.s_addr);
}
if (!rc) {