mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
treewide: mark things static and const
Mark some structures, arrays static/const at various places. In some cases this prevents unnecessary initialization when a function is entered. All in all, the text segments across all shared libraries are reduced by about 2 KiB. However, the total size increases by about 2 KiB as well.
This commit is contained in:
parent
48dbb4da3c
commit
f5d51162c4
54 changed files with 303 additions and 241 deletions
|
|
@ -1163,7 +1163,7 @@ static int setup_midifile(struct data *data)
|
|||
|
||||
static int fill_properties(struct data *data)
|
||||
{
|
||||
static const char* table[] = {
|
||||
static const char * const table[] = {
|
||||
[SF_STR_TITLE] = PW_KEY_MEDIA_TITLE,
|
||||
[SF_STR_COPYRIGHT] = PW_KEY_MEDIA_COPYRIGHT,
|
||||
[SF_STR_SOFTWARE] = PW_KEY_MEDIA_SOFTWARE,
|
||||
|
|
@ -1171,6 +1171,7 @@ static int fill_properties(struct data *data)
|
|||
[SF_STR_COMMENT] = PW_KEY_MEDIA_COMMENT,
|
||||
[SF_STR_DATE] = PW_KEY_MEDIA_DATE
|
||||
};
|
||||
|
||||
SF_INFO sfi;
|
||||
SF_FORMAT_INFO fi;
|
||||
int res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue