[PATCH 1/2] Added 'const' qualifier to the filename argument to internal functions

Christophe christophe.curis at free.fr
Wed May 1 01:39:37 PDT 2013


From: Christophe CURIS <christophe.curis at free.fr>

---
 src/RdFToI.c |    4 ++--
 src/WrFFrI.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/RdFToI.c b/src/RdFToI.c
index e56e3f8..83340a6 100644
--- a/src/RdFToI.c
+++ b/src/RdFToI.c
@@ -49,7 +49,7 @@
 #endif
 #endif
 
-LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata));
+LFUNC(OpenReadFile, int, (const char *filename, xpmData *mdata));
 LFUNC(xpmDataClose, void, (xpmData *mdata));
 
 FUNC(xpmPipeThrough, FILE*, (int fd,
@@ -194,7 +194,7 @@ fail2:
  */
 static int
 OpenReadFile(
-    char	*filename,
+    const char	*filename,
     xpmData	*mdata)
 {
     if (!filename) {
diff --git a/src/WrFFrI.c b/src/WrFFrI.c
index d074516..bf47481 100644
--- a/src/WrFFrI.c
+++ b/src/WrFFrI.c
@@ -63,7 +63,7 @@ LFUNC(WritePixels, int, (FILE *file, unsigned int width, unsigned int height,
 LFUNC(WriteExtensions, void, (FILE *file, XpmExtension *ext,
 			      unsigned int num));
 
-LFUNC(OpenWriteFile, int, (char *filename, xpmData *mdata));
+LFUNC(OpenWriteFile, int, (const char *filename, xpmData *mdata));
 LFUNC(xpmDataClose, void, (xpmData *mdata));
 
 int
@@ -319,7 +319,7 @@ FUNC(xpmPipeThrough, FILE*, (int fd,
  */
 static int
 OpenWriteFile(
-    char	*filename,
+    const char	*filename,
     xpmData	*mdata)
 {
     if (!filename) {
-- 
1.7.10.4



More information about the xorg-devel mailing list