]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Removed a couple warnings from utils/mount/stropts.c
authorSteve Dickson <steved@redhat.com>
Mon, 22 Nov 2010 16:33:37 +0000 (11:33 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 22 Nov 2010 16:33:37 +0000 (11:33 -0500)
stropts.c:740:6: warning: 'ret' may be used uninitialized in this function
stropts.c:653:6: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/stropts.c

index ac81616fde125a6820920780d7f7f653816d8cf9..e314b82f6034d2d1762e89847963761855cedfa6 100644 (file)
@@ -650,7 +650,7 @@ out_fail:
 static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
 {
        struct addrinfo *ai;
-       int ret;
+       int ret = 0;
 
        for (ai = mi->address; ai != NULL; ai = ai->ai_next) {
                ret = nfs_do_mount_v3v2(mi, ai->ai_addr, ai->ai_addrlen);
@@ -737,7 +737,7 @@ out_fail:
 static int nfs_try_mount_v4(struct nfsmount_info *mi)
 {
        struct addrinfo *ai;
-       int ret;
+       int ret = 0;
 
        for (ai = mi->address; ai != NULL; ai = ai->ai_next) {
                ret = nfs_do_mount_v4(mi, ai->ai_addr, ai->ai_addrlen);