Blob Blame Raw
From f1a2bb1f76fd670d90b3c6b44d8b071a6c8330ba Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 28 Apr 2013 14:06:57 +0200
Subject: [PATCH 376/482] 	* grub-core/kern/file.c: Use const char *
 rather than casting to 	non-const.

---
 ChangeLog             | 5 +++++
 grub-core/kern/file.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c50b56..da92415 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
 
+	* grub-core/kern/file.c: Use const char * rather than casting to
+	non-const.
+
+2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
+
 	* grub-core/commands/probe.c: Add missing grub_device_close.
 
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c
index d2a6317..6426668 100644
--- a/grub-core/kern/file.c
+++ b/grub-core/kern/file.c
@@ -64,7 +64,7 @@ grub_file_open (const char *name)
   grub_device_t device = 0;
   grub_file_t file = 0, last_file = 0;
   char *device_name;
-  char *file_name;
+  const char *file_name;
   grub_file_filter_id_t filter;
 
   device_name = grub_file_get_device_name (name);
@@ -76,7 +76,7 @@ grub_file_open (const char *name)
   if (file_name)
     file_name++;
   else
-    file_name = (char *) name;
+    file_name = name;
 
   device = grub_device_open (device_name);
   grub_free (device_name);
-- 
1.8.2.1