]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
add "const" and "static" attributes to file-scoped globals
authorJim Meyering <meyering@redhat.com>
Fri, 9 May 2008 08:02:44 +0000 (08:02 +0000)
committerJim Meyering <meyering@redhat.com>
Fri, 9 May 2008 08:02:44 +0000 (08:02 +0000)
* src/storage_backend_fs.c (fileTypeInfo): Add "static" and two
"const" attributes.
(FileTypeInfo): Name the previously anonymous struct,
so the declaration of fileTypeInfo looks more conventional.
* src/xend_internal.c (sound_models): Mark as static, and
as an array of "const" entries.

These were relatively new additions to the list from here:
nm src/*.o|grep ' D '

ChangeLog
src/storage_backend_fs.c
src/xend_internal.c

index 76829936fe0a0c853b43d94719e6b967e369c9ee..f993421cba4a00580322a02d5bb3f1fb4159a732 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Fri May  9 10:01:34 EST 2008 Jim Meyering <meyering@redhat.com>
+
+       add "const" and "static" attributes to file-scoped globals
+       * src/storage_backend_fs.c (fileTypeInfo): Add "static" and two
+       "const" attributes.
+       (FileTypeInfo): Name the previously anonymous struct,
+       so the declaration of fileTypeInfo looks more conventional.
+       * src/xend_internal.c (sound_models): Mark as static, and
+       as an array of "const" entries.
+       These were relatively new additions to the list from here:
+       nm src/*.o|grep ' D '
+
 Thu May  9 00:07:34 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>
 
        * src/lxc_driver.c: use epoll in tty process to avoid consuming the
index d0eb32a18c9c223015f397e3e4f164efce04abc5..b41b95230969c7ffb33ddc59b4b1a04ee82cacaf 100644 (file)
@@ -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 */
index 6d64509b398bf3d7a10c9cbd120bd4e08a67da5f..ffbadf95d97f6bb271fca894254b710c427e4eed 100644 (file)
@@ -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: