[PATCH 07/13] ui-repolist: make sortcolumn definitions 'static const'
John Keeping
john at keeping.me.uk
Sun Mar 8 17:32:21 CET 2015
These are not used outside this file and are not declared; they are also
never modified.
Signed-off-by: John Keeping <john at keeping.me.uk>
---
ui-repolist.c | 4 ++--
1 file 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))
--
2.3.1.308.g754cd77
More information about the CGit
mailing list