]> git.proxmox.com Git - mirror_zfs.git/blobdiff - lib/libspl/getmntany.c
cstyle: Resolve C style issues
[mirror_zfs.git] / lib / libspl / getmntany.c
index f0b1cda4b5a85c1bb2a7068edc5269aab503b6d9..d78357af5423fcad5d41387e30b8de576d82afea 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define BUFSIZE (MNT_LINE_MAX + 2)
+#define        BUFSIZE (MNT_LINE_MAX + 2)
 
 __thread char buf[BUFSIZE];
 
-#define DIFF(xx) ((mrefp->xx != NULL) && \
-                 (mgetp->xx == NULL || strcmp(mrefp->xx, mgetp->xx) != 0))
+#define        DIFF(xx)        ( \
+           (mrefp->xx != NULL) && \
+           (mgetp->xx == NULL || strcmp(mrefp->xx, mgetp->xx) != 0))
 
 int
 getmntany(FILE *fp, struct mnttab *mgetp, struct mnttab *mrefp)
 {
        int ret;
 
-       while (((ret = _sol_getmntent(fp, mgetp)) == 0) &&
-              (DIFF(mnt_special) || DIFF(mnt_mountp) ||
-               DIFF(mnt_fstype) || DIFF(mnt_mntopts)));
+       while (
+           ((ret = _sol_getmntent(fp, mgetp)) == 0) && (
+           DIFF(mnt_special) || DIFF(mnt_mountp) ||
+           DIFF(mnt_fstype) || DIFF(mnt_mntopts)));
 
-       return ret;
+       return (ret);
 }
 
 int
@@ -69,13 +71,13 @@ _sol_getmntent(FILE *fp, struct mnttab *mgetp)
                mgetp->mnt_mountp = mntbuf.mnt_dir;
                mgetp->mnt_fstype = mntbuf.mnt_type;
                mgetp->mnt_mntopts = mntbuf.mnt_opts;
-               return 0;
+               return (0);
        }
 
        if (feof(fp))
-               return -1;
+               return (-1);
 
-       return MNT_TOOLONG;
+       return (MNT_TOOLONG);
 }
 
 int
@@ -89,11 +91,11 @@ getextmntent(FILE *fp, struct extmnttab *mp, int len)
                if (stat64(mp->mnt_mountp, &st) != 0) {
                        mp->mnt_major = 0;
                        mp->mnt_minor = 0;
-                       return ret;
+                       return (ret);
                }
                mp->mnt_major = major(st.st_dev);
                mp->mnt_minor = minor(st.st_dev);
        }
 
-       return ret;
+       return (ret);
 }