about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJohn Keeping2015-03-08 16:32:21 +0000
committerJason A. Donenfeld2015-03-09 17:39:35 +0100
commitad74669e67ea08969776e6700ec37323e4935e23 (patch)
treebcd897715c9d8345e1bff61382689ec7e1812c54
parentui-log: make some variables 'static' (diff)
downloadcgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.gz
cgit-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>
-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 {
223 int (*fn)(const void *a, const void *b); 223 int (*fn)(const void *a, const void *b);
224}; 224};
225 225
226struct sortcolumn sortcolumn[] = { 226static const struct sortcolumn sortcolumn[] = {
227 {"section", sort_section}, 227 {"section", sort_section},
228 {"name", sort_name}, 228 {"name", sort_name},
229 {"desc", sort_desc}, 229 {"desc", sort_desc},
@@ -234,7 +234,7 @@ struct sortcolumn sortcolumn[] = {
234 234
235static int sort_repolist(char *field) 235static int sort_repolist(char *field)
236{ 236{
237 struct sortcolumn *column; 237 const struct sortcolumn *column;
238 238
239 for (column = &sortcolumn[0]; column->name; column++) { 239 for (column = &sortcolumn[0]; column->name; column++) {
240 if (strcmp(field, column->name)) 240 if (strcmp(field, column->name))