]> granicus.if.org Git - cgit/commitdiff
ui-repolist: make sortcolumn definitions 'static const'
authorJohn Keeping <john@keeping.me.uk>
Sun, 8 Mar 2015 16:32:21 +0000 (16:32 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 9 Mar 2015 16:39:35 +0000 (17:39 +0100)
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>
ui-repolist.c

index a6d032114db92ab052deaae236939a82f7992027..2453a7f4a4229d5bbb7479a87b928593618acb35 100644 (file)
@@ -223,7 +223,7 @@ struct sortcolumn {
        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 @@ struct sortcolumn sortcolumn[] = {
 
 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))