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 '
This commit is contained in:
Jim Meyering 2008-05-09 08:02:44 +00:00
parent 6ca76333f3
commit 712251009b
3 changed files with 14 additions and 2 deletions

View File

@ -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

View 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 */

View 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: