summaryrefslogtreecommitdiffstats
path: root/lib/libspl/getmntany.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libspl/getmntany.c')
-rw-r--r--lib/libspl/getmntany.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/libspl/getmntany.c b/lib/libspl/getmntany.c
index f0b1cda4b..d78357af5 100644
--- a/lib/libspl/getmntany.c
+++ b/lib/libspl/getmntany.c
@@ -37,23 +37,25 @@
#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);
}