提交 71225100 编写于 作者: J 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 '
上级 6ca76333
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
......
......@@ -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 */
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册