Make some static tables and strings constants.

By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
Diego E. 'Flameeyes' Pettenò 2008-11-21 01:21:32 +01:00
parent 29a14294fc
commit 8ed98db259
14 changed files with 49 additions and 49 deletions

View file

@ -146,7 +146,7 @@ static int snd_pcm_ioplug_prepare(snd_pcm_t *pcm)
return 0;
}
static int hw_params_type[SND_PCM_IOPLUG_HW_PARAMS] = {
static const int hw_params_type[SND_PCM_IOPLUG_HW_PARAMS] = {
[SND_PCM_IOPLUG_HW_ACCESS] = SND_PCM_HW_PARAM_ACCESS,
[SND_PCM_IOPLUG_HW_FORMAT] = SND_PCM_HW_PARAM_FORMAT,
[SND_PCM_IOPLUG_HW_CHANNELS] = SND_PCM_HW_PARAM_CHANNELS,
@ -483,7 +483,7 @@ static int snd_pcm_ioplug_drain(snd_pcm_t *pcm)
static int snd_pcm_ioplug_pause(snd_pcm_t *pcm, int enable)
{
ioplug_priv_t *io = pcm->private_data;
static snd_pcm_state_t states[2] = {
static const snd_pcm_state_t states[2] = {
SND_PCM_STATE_RUNNING, SND_PCM_STATE_PAUSED
};
int prev, err;