summaryrefslogtreecommitdiff
path: root/usr.sbin/ldapd/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldapd/btree.c')
-rw-r--r--usr.sbin/ldapd/btree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ldapd/btree.c b/usr.sbin/ldapd/btree.c
index ae4c2f00fc0..8397e23910d 100644
--- a/usr.sbin/ldapd/btree.c
+++ b/usr.sbin/ldapd/btree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: btree.c,v 1.3 2010/06/02 09:12:13 martinh Exp $ */
+/* $OpenBSD: btree.c,v 1.4 2010/06/03 17:32:25 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -173,7 +173,7 @@ struct node {
uint16_t ksize; /* key size */
#define F_BIGDATA 0x01 /* data put on overflow page */
uint8_t flags;
- char data[];
+ char data[1];
};
struct btree_txn {
@@ -2168,6 +2168,7 @@ btree_merge(struct btree *bt, struct mpage *src, struct mpage *dst)
{
int rc;
indx_t i;
+ unsigned int pfxlen;
struct node *srcnode;
struct btkey tmpkey, dstpfx;
struct btval key, data;
@@ -2240,7 +2241,7 @@ btree_merge(struct btree *bt, struct mpage *src, struct mpage *dst)
if (btree_update_key(bt, src->parent, 0, &key) != BT_SUCCESS)
return BT_FAIL;
- unsigned int pfxlen = src->prefix.len;
+ pfxlen = src->prefix.len;
find_common_prefix(bt, src);
assert (src->prefix.len == pfxlen);
}