diff options
author | John Keeping <john@keeping.me.uk> | 2015-03-08 17:32:21 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2015-03-09 17:39:35 +0100 |
commit | ad74669e67ea08969776e6700ec37323e4935e23 (patch) | |
tree | bcd897715c9d8345e1bff61382689ec7e1812c54 | |
parent | 3fe509e17a337cbaa300b4b9aa2a248c2d0be873 (diff) | |
download | cgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.gz cgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.xz |
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.c | 4 |
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)) |