mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
Make string arrays as constant as possible.
Use "const char *const []" as type for string arrays, or convert to "const char [][x]" when it makes sense. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
parent
2eaf9403d2
commit
fc8d8bb2e6
4 changed files with 25 additions and 25 deletions
|
|
@ -89,7 +89,7 @@ typedef struct _selem_none {
|
|||
} str[2];
|
||||
} selem_none_t;
|
||||
|
||||
static struct mixer_name_table {
|
||||
static const struct mixer_name_table {
|
||||
const char *longname;
|
||||
const char *shortname;
|
||||
} name_table[] = {
|
||||
|
|
@ -106,7 +106,7 @@ static struct mixer_name_table {
|
|||
|
||||
static const char *get_short_name(const char *lname)
|
||||
{
|
||||
struct mixer_name_table *p;
|
||||
const struct mixer_name_table *p;
|
||||
for (p = name_table; p->longname; p++) {
|
||||
if (!strcmp(lname, p->longname))
|
||||
return p->shortname;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue