]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
umount.nfs: Use correct data type in nfsumount()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Jul 2009 20:57:07 +0000 (16:57 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 14 Jul 2009 20:57:07 +0000 (16:57 -0400)
Address compiler warning:

    nfsumount.c: In function nfsumount:
    nfsumount.c:347: warning: comparison between signed and unsigned

The result type of pointer arithmetic and the return type of strlen(3)
are both size_t.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/nfsumount.c

index ba2790068dcc79de499939b08d1d86e9972b3639..f81db14e4d43e53ddebb7af98d73be4048ac7956 100644 (file)
@@ -336,7 +336,7 @@ int nfsumount(int argc, char *argv[])
                        char *opt = hasmntopt(&mc->m, "user");
                        struct passwd *pw;
                        char *comma;
-                       int len;
+                       size_t len;
                        if (!opt)
                                goto only_root;
                        if (opt[4] != '=')