Skip to content

Commit aa43be2

Browse files
markjdbbapt
authored andcommitted
libpkg: Mark some tables const
No functional change intended.
1 parent 4f366c4 commit aa43be2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

libpkg/pkgbase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ scan_dir_for_shlibs(charv_t *shlib_list, const char *dir,
8585
return (EPKG_OK);
8686
}
8787

88-
static struct {
88+
static const struct {
8989
const char *dir;
9090
enum pkg_shlib_flags flags;
9191
} system_shlib_table[] = {

libpkg/private/pkg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ struct pkg_repo_it_ops {
468468

469469
struct pkg_repo_it {
470470
struct pkg_repo *repo;
471-
struct pkg_repo_it_ops *ops;
471+
const struct pkg_repo_it_ops *ops;
472472
int flags;
473473
void *data;
474474
};
@@ -520,7 +520,7 @@ struct pkg_key {
520520
};
521521

522522
struct pkg_repo {
523-
struct pkg_repo_ops *ops;
523+
const struct pkg_repo_ops *ops;
524524

525525
char *name;
526526
struct fetcher *fetcher;

libpkg/repo/binary/query.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ static int pkg_repo_binary_group_it_next(struct pkg_repo_it *it, struct pkg **pk
6161
static void pkg_repo_binary_group_it_free(struct pkg_repo_it *it);
6262
static void pkg_repo_binary_group_it_reset(struct pkg_repo_it *it);
6363

64-
static struct pkg_repo_it_ops pkg_repo_binary_it_ops = {
64+
static const struct pkg_repo_it_ops pkg_repo_binary_it_ops = {
6565
.next = pkg_repo_binary_it_next,
6666
.free = pkg_repo_binary_it_free,
6767
.reset = pkg_repo_binary_it_reset
6868
};
6969

70-
static struct pkg_repo_it_ops pkg_repo_binary_group_it_ops = {
70+
static const struct pkg_repo_it_ops pkg_repo_binary_group_it_ops = {
7171
.next = pkg_repo_binary_group_it_next,
7272
.free = pkg_repo_binary_group_it_free,
7373
.reset = pkg_repo_binary_group_it_reset

src/query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include <pkg.h>
4242
#include "pkgcli.h"
4343

44-
static struct query_flags accepted_query_flags[] = {
44+
static const struct query_flags accepted_query_flags[] = {
4545
{ 'd', "nov", 1, PKG_LOAD_DEPS },
4646
{ 'r', "nov", 1, PKG_LOAD_RDEPS },
4747
{ 'C', "", 1, PKG_LOAD_CATEGORIES },

0 commit comments

Comments
 (0)