From 1e41004f15eab15ab35ac8a487a67fafcc03c74c Mon Sep 17 00:00:00 2001 From: nicm <> Date: Sun, 4 Sep 2016 14:51:39 +0000 Subject: [PATCH] Make the key sizes and offsets arrays const, ok tedu --- src/include/icdb.h | 4 ++-- src/lib/libc/stdlib/icdb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/icdb.h b/src/include/icdb.h index ba69081a..921e4ed8 100644 --- a/src/include/icdb.h +++ b/src/include/icdb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icdb.h,v 1.3 2016/09/04 11:53:23 nicm Exp $ */ +/* $OpenBSD: icdb.h,v 1.4 2016/09/04 14:51:39 nicm Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -25,7 +25,7 @@ __BEGIN_DECLS struct icdb; struct icdb *icdb_new(uint32_t version, uint32_t nentries, uint32_t entrysize, - uint32_t nkeys, uint32_t *keysizes, uint32_t *keyoffsets); + uint32_t nkeys, const uint32_t *keysizes, const uint32_t *keyoffsets); struct icdb *icdb_open(const char *name, int flags, uint32_t version); int icdb_get(struct icdb *db, void *entry, uint32_t idx); diff --git a/src/lib/libc/stdlib/icdb.c b/src/lib/libc/stdlib/icdb.c index 5bf549ec..e135bf02 100644 --- a/src/lib/libc/stdlib/icdb.c +++ b/src/lib/libc/stdlib/icdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icdb.c,v 1.6 2016/05/30 03:06:58 guenther Exp $ */ +/* $OpenBSD: icdb.c,v 1.7 2016/09/04 14:51:39 nicm Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -114,7 +114,7 @@ roundup(uint32_t num) struct icdb * icdb_new(uint32_t version, uint32_t nentries, uint32_t entrysize, - uint32_t nkeys, uint32_t *keysizes, uint32_t *keyoffsets) + uint32_t nkeys, const uint32_t *keysizes, const uint32_t *keyoffsets) { struct icdb *db; struct icdbinfo *info;