aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-03-08 16:32:21 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2015-03-09 17:39:35 +0100
commitad74669e67ea08969776e6700ec37323e4935e23 (patch)
treebcd897715c9d8345e1bff61382689ec7e1812c54
parent3fe509e17a337cbaa300b4b9aa2a248c2d0be873 (diff)
downloadcgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.gz
cgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.bz2
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>
-rw-r--r--ui-repolist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index a6d0321..2453a7f 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -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))