diff --git a/ChangeLog b/ChangeLog index 76829936fe..f993421cba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Fri May 9 10:01:34 EST 2008 Jim Meyering + + 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 * src/lxc_driver.c: use epoll in tty process to avoid consuming the diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c index d0eb32a18c..b41b952309 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 6d64509b39..ffbadf95d9 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: