nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0376-grub-core-kern-file.c-Use-const-char-rather-than-cas.patch

f96e0b
From f1a2bb1f76fd670d90b3c6b44d8b071a6c8330ba Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Sun, 28 Apr 2013 14:06:57 +0200
f96e0b
Subject: [PATCH 376/482] 	* grub-core/kern/file.c: Use const char *
f96e0b
 rather than casting to 	non-const.
f96e0b
f96e0b
---
f96e0b
 ChangeLog             | 5 +++++
f96e0b
 grub-core/kern/file.c | 4 ++--
f96e0b
 2 files changed, 7 insertions(+), 2 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 5c50b56..da92415 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,10 @@
f96e0b
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* grub-core/kern/file.c: Use const char * rather than casting to
f96e0b
+	non-const.
f96e0b
+
f96e0b
+2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/commands/probe.c: Add missing grub_device_close.
f96e0b
 
f96e0b
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c
f96e0b
index d2a6317..6426668 100644
f96e0b
--- a/grub-core/kern/file.c
f96e0b
+++ b/grub-core/kern/file.c
f96e0b
@@ -64,7 +64,7 @@ grub_file_open (const char *name)
f96e0b
   grub_device_t device = 0;
f96e0b
   grub_file_t file = 0, last_file = 0;
f96e0b
   char *device_name;
f96e0b
-  char *file_name;
f96e0b
+  const char *file_name;
f96e0b
   grub_file_filter_id_t filter;
f96e0b
 
f96e0b
   device_name = grub_file_get_device_name (name);
f96e0b
@@ -76,7 +76,7 @@ grub_file_open (const char *name)
f96e0b
   if (file_name)
f96e0b
     file_name++;
f96e0b
   else
f96e0b
-    file_name = (char *) name;
f96e0b
+    file_name = name;
f96e0b
 
f96e0b
   device = grub_device_open (device_name);
f96e0b
   grub_free (device_name);
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b