diff options
author | John Keeping | 2015-03-08 16:32:21 +0000 |
---|---|---|
committer | Jason A. Donenfeld | 2015-03-09 17:39:35 +0100 |
commit | ad74669e67ea08969776e6700ec37323e4935e23 (patch) | |
tree | bcd897715c9d8345e1bff61382689ec7e1812c54 /ui-repolist.c | |
parent | 3fe509e17a337cbaa300b4b9aa2a248c2d0be873 (diff) | |
download | cgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.gz cgit-ad74669e67ea08969776e6700ec37323e4935e23.tar.bz2 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>
Diffstat (limited to 'ui-repolist.c')
-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 { | |||
223 | int (*fn)(const void *a, const void *b); | 223 | int (*fn)(const void *a, const void *b); |
224 | }; | 224 | }; |
225 | 225 | ||
226 | struct sortcolumn sortcolumn[] = { | 226 | static 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 | ||
235 | static int sort_repolist(char *field) | 235 | static 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)) |