From 1abf7518ada8a2b977cac0b97bd47da2aeb2f2d2 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 7 Jun 2014 19:35:35 +0200 Subject: [PATCH] mount: remove stat, not needed since we use realpath --- mount.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mount.c b/mount.c index 071d59f..8e870d8 100644 --- a/mount.c +++ b/mount.c @@ -126,7 +126,6 @@ main(int argc, char *argv[]) char *files[] = { "/proc/mounts", "/etc/fstab", NULL }; size_t datasiz = sizeof(data); const char *source, *target; - struct stat st; struct mntent *me = NULL; FILE *fp; @@ -176,8 +175,6 @@ main(int argc, char *argv[]) if(!target) { target = argv[0]; source = NULL; - if(stat(target, &st) < 0) - eprintf("stat %s:", target); if(!(resolvpath = realpath(target, NULL))) eprintf("realpath %s:", target); target = resolvpath;