[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] add "const" to file-scoped statics



>From fed1a1abfd2b9ece7bd8e44aae13de91eaad4f5d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Wed, 7 May 2008 23:12:13 +0200
Subject: [PATCH] add "const" to file-scoped statics

These were relatively new additions to the list from here:
nm src/*.o|grep ' D '.
This is another test that should be automatic...
---
 src/storage_backend_fs.c |    2 +-
 src/xend_internal.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c
index d0eb32a..b41b952 100644
--- a/src/storage_backend_fs.c
+++ b/src/storage_backend_fs.c
@@ -79,7 +79,7 @@ enum {
 };

 /* Either 'magic' or 'extension' *must* be provided */
-struct {
+static const struct {
     int type;           /* One of the constants above */
     const char *magic;  /* Optional string of file magic
                          * to check at head of file */
diff --git a/src/xend_internal.c b/src/xend_internal.c
index f9db571..dd3ade6 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -854,7 +854,7 @@ urlencode(const char *string)
 #endif /* ! PROXY */

 /* Applicable sound models */
-const char *sound_models[] = { "sb16", "es1370" };
+static const char *const sound_models[] = { "sb16", "es1370" };

 /**
  * is_sound_model_valid:
--
1.5.5.1.148.gbc1be


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]