[Libguestfs] [PATCH] daemon/file.c: remove duplicate absolute-path check

Jim Meyering jim at meyering.net
Fri Aug 7 18:07:50 UTC 2009


minor clean-up:

>From cac2ce53aec6d3aaca83e4bbc3551d452c29c0b2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 7 Aug 2009 20:07:03 +0200
Subject: [PATCH] daemon/file.c: remove duplicate absolute-path check

* daemon/file.c (do_file): Remove redundant use of ABS_PATH.
It's redundant because the preceding line invokes NEED_ROOT_OR_IS_DEVICE,
which also invokes ABS_PATH.
---
 daemon/file.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/daemon/file.c b/daemon/file.c
index 63d8dd2..cd477e5 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -392,7 +392,6 @@ do_file (char *path)
   int len;

   NEED_ROOT_OR_IS_DEVICE (path, NULL);
-  ABS_PATH (path, NULL);

   if (strncmp (path, "/dev/", 5) == 0)
     buf = (char *) path;
--
1.6.4.161.gc0b1




More information about the Libguestfs mailing list