mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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
|
|
@ -112,7 +112,7 @@ static uint32_t get_count(struct impl *this)
|
|||
#else
|
||||
static uint32_t get_count(struct impl *this)
|
||||
{
|
||||
int mib[] = {CTL_HW, HW_NCPU};
|
||||
static const int mib[] = {CTL_HW, HW_NCPU};
|
||||
int r;
|
||||
size_t rSize = sizeof(r);
|
||||
if(-1 == sysctl(mib, 2, &r, &rSize, 0, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue