[PATCH] [MTD-UTILS] nandwrite: Eliminate Global Declaration Ambiguity

Grant Erickson gerickson at nuovations.com
Sun Sep 14 15:40:05 EDT 2008


Eliminate ambiguity as to whether the static global 'img' is a
character pointer or a constant character pointer.

Signed-off-by: Grant Erickson <gerickson at nuovations.com>
---

Enrico Scholz <enrico.scholz at sigma-chemnitz.de> raised a valid point
<http://lists.infradead.org/pipermail/linux-mtd/2008-September/022968.html>
that the declaration of mtd_device and img globals are somewhat
unclear with respect to the type for the typical reader.

 nandwrite.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index fc23e85..af73aa8 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -113,7 +113,8 @@ static void display_version (void)
 }
 
 static const char	*standard_input = "-";
-static const char	*mtd_device, *img;
+static const char	*mtd_device;
+static const char	*img;
 static int		mtdoffset = 0;
 static bool		quiet = false;
 static bool		writeoob = false;
-- 
1.6.0.1




More information about the linux-mtd mailing list