]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsumount.c
umount.nfs: Use correct data type in nfsumount()
[nfs-utils.git] / utils / mount / nfsumount.c
index 9b48cc9a63239d9c92eb89edf31cdfd56476ae72..f81db14e4d43e53ddebb7af98d73be4048ac7956 100644 (file)
@@ -174,7 +174,10 @@ static int nfs_umount_do_umnt(struct mount_options *options,
        socklen_t salen = sizeof(address);
        struct pmap nfs_pmap, mnt_pmap;
 
-       nfs_options2pmap(options, &nfs_pmap, &mnt_pmap);
+       if (!nfs_options2pmap(options, &nfs_pmap, &mnt_pmap)) {
+               nfs_error(_("%s: bad mount options"), progname);
+               return EX_FAIL;
+       }
 
        *hostname = nfs_umount_hostname(options, *hostname);
        if (!*hostname) {
@@ -333,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] != '=')