]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: Remove get_my_ipv4addr() from append_addr_opt()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 24 Aug 2007 17:11:22 +0000 (13:11 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 24 Aug 2007 22:19:32 +0000 (08:19 +1000)
The result of the get_my_ipv4addr() function is not used in
append_addr_opt(), so remove the call and the ip_addr variable.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/stropts.c

index e43bbf48d356772c2bfa255edbebb4388138a3fd..cc13325750aa1eb22e542c6c7911a8333e770838 100644 (file)
@@ -168,7 +168,7 @@ static void extract_interesting_options(char *opts)
  */
 static int append_addr_opt(const char *spec, char **extra_opts)
 {
  */
 static int append_addr_opt(const char *spec, char **extra_opts)
 {
-       static char hostdir[1024], new_opts[1024], ip_addr[255];
+       static char hostdir[1024], new_opts[1024];
        char *hostname, *dirname, *s, *old_opts;
        struct sockaddr_in addr;
 
        char *hostname, *dirname, *s, *old_opts;
        struct sockaddr_in addr;
 
@@ -186,8 +186,6 @@ static int append_addr_opt(const char *spec, char **extra_opts)
 
        if (!fill_ipv4_sockaddr(hostname, &addr))
                return 0;
 
        if (!fill_ipv4_sockaddr(hostname, &addr))
                return 0;
-       if (!get_my_ipv4addr(ip_addr, sizeof(ip_addr)))
-               return 0;
 
        /* add IP address to mtab options for use when unmounting */
        s = inet_ntoa(addr.sin_addr);
 
        /* add IP address to mtab options for use when unmounting */
        s = inet_ntoa(addr.sin_addr);