ui-repolist: make sortcolumn definitions 'static const' These are not used outside this file and are not declared; they are also never modified. Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sun, 08 Mar 2015 16:32:21 +0000
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
ui-repolist.c
→
ui-repolist.c
@@ -223,7 +223,7 @@ const char *name;
int (*fn)(const void *a, const void *b); }; -struct sortcolumn sortcolumn[] = { +static const struct sortcolumn sortcolumn[] = { {"section", sort_section}, {"name", sort_name}, {"desc", sort_desc},@@ -234,7 +234,7 @@ };
static int sort_repolist(char *field) { - struct sortcolumn *column; + const struct sortcolumn *column; for (column = &sortcolumn[0]; column->name; column++) { if (strcmp(field, column->name))