Skip to content

Commit 9a799a8

Browse files
markjdbbapt
authored andcommitted
libpkg: Mark some tables as const
No functional change intended.
1 parent f88fd01 commit 9a799a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libpkg/pkg_abi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct arch_trans {
3333
const char *archid;
3434
};
3535

36-
static struct arch_trans machine_arch_translation[] = { { "x86:32", "i386" },
36+
static const struct arch_trans machine_arch_translation[] = { { "x86:32", "i386" },
3737
{ "x86:64", "amd64" }, { "powerpc:32:eb", "powerpc" },
3838
{ "powerpc:64:eb", "powerpc64" }, { "powerpc:64:el", "powerpc64le" },
3939
{ "sparc64:64", "sparc64" }, { "ia64:64", "ia64" },
@@ -50,7 +50,7 @@ static struct arch_trans machine_arch_translation[] = { { "x86:32", "i386" },
5050

5151
{ NULL, NULL } };
5252

53-
static struct {
53+
static const struct {
5454
enum pkg_os os;
5555
const char *string;
5656
} os_string_table[] = {
@@ -65,7 +65,7 @@ static struct {
6565

6666
/* This table does not include PKG_ARCH_AMD64 as the string translation of
6767
that arch is os-dependent. */
68-
static struct {
68+
static const struct {
6969
enum pkg_arch arch;
7070
const char *string;
7171
} arch_string_table[] = {
@@ -403,7 +403,7 @@ int
403403
pkg_arch_to_legacy(const char *arch, char *dest, size_t sz)
404404
{
405405
int i = 0;
406-
struct arch_trans *arch_trans;
406+
const struct arch_trans *arch_trans;
407407

408408
memset(dest, '\0', sz);
409409
/* Lower case the OS */

0 commit comments

Comments
 (0)