about summary refs log tree commit diff
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
parentui-log: make some variables 'static' (diff)
downloadcgit-pink-ad74669e67ea08969776e6700ec37323e4935e23.tar.gz
cgit-pink-ad74669e67ea08969776e6700ec37323e4935e23.zip
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>
Diffstat (limited to '')
-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))