Browse Source

Make the key sizes and offsets arrays const, ok tedu

OPENBSD_6_1
nicm 8 years ago
parent
commit
1e41004f15
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/include/icdb.h
  2. +2
    -2
      src/lib/libc/stdlib/icdb.c

+ 2
- 2
src/include/icdb.h View File

@ -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 <tedu@openbsd.org>
*
@ -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);


+ 2
- 2
src/lib/libc/stdlib/icdb.c View File

@ -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 <tedu@openbsd.org>
*
@ -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;


Loading…
Cancel
Save