From 4960242acb9c9ece7f58cc8547e0536bbff479fa Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 26 Aug 2016 10:35:22 -0500 Subject: [PATCH] pkg: make some compile-time defined tables const --- libpkgconf/pkg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 9f0869e..e6b58e7 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -766,7 +766,7 @@ typedef struct { pkgconf_pkg_comparator_t compare; } pkgconf_pkg_comparator_name_t; -static pkgconf_pkg_comparator_name_t pkgconf_pkg_comparator_names[PKGCONF_CMP_SIZE + 1] = { +static const pkgconf_pkg_comparator_name_t pkgconf_pkg_comparator_names[PKGCONF_CMP_SIZE + 1] = { {"<", PKGCONF_CMP_LESS_THAN}, {">", PKGCONF_CMP_GREATER_THAN}, {"<=", PKGCONF_CMP_LESS_THAN_EQUAL}, @@ -823,7 +823,7 @@ static bool pkgconf_pkg_comparator_unimplemented(pkgconf_pkg_t *pkg, pkgconf_dep return false; } -static pkgconf_vercmp_res_func_t pkgconf_pkg_comparator_impls[PKGCONF_CMP_SIZE + 1] = { +static const pkgconf_vercmp_res_func_t pkgconf_pkg_comparator_impls[PKGCONF_CMP_SIZE + 1] = { [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_any, [PKGCONF_CMP_LESS_THAN] = pkgconf_pkg_comparator_lt, [PKGCONF_CMP_GREATER_THAN] = pkgconf_pkg_comparator_gt,