diff options
Diffstat (limited to 'sbin/mount_nullfs/mount_nullfs.c')
-rw-r--r-- | sbin/mount_nullfs/mount_nullfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c index 4f84954..c88db3d 100644 --- a/sbin/mount_nullfs/mount_nullfs.c +++ b/sbin/mount_nullfs/mount_nullfs.c @@ -90,8 +90,10 @@ main(int argc, char *argv[]) usage(); /* resolve target and source with realpath(3) */ - (void)checkpath(argv[0], target); - (void)checkpath(argv[1], source); + if (checkpath(argv[0], target) != 0) + err(EX_USAGE, "%s", target); + if (checkpath(argv[1], source) != 0) + err(EX_USAGE, "%s", source); if (subdir(target, source) || subdir(source, target)) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", |