mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Cleanup - macroize magic constant (ITS#5909)
This commit is contained in:
parent
f8a77ecfa2
commit
47617b033c
@ -21,6 +21,7 @@
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <ac/stdlib.h>
|
||||
|
||||
@ -35,6 +36,9 @@
|
||||
#define AVL_INTERNAL
|
||||
#include "avl.h"
|
||||
|
||||
/* Maximum tree depth this host's address space could support */
|
||||
#define MAX_TREE_DEPTH (sizeof(void *) * CHAR_BIT)
|
||||
|
||||
static const int avl_bfs[] = {LH, RH};
|
||||
|
||||
/*
|
||||
@ -189,8 +193,8 @@ tavl_delete( Avlnode **root, void* data, AVL_CMP fcmp )
|
||||
int side, side_bf, shorter, nside = -1;
|
||||
|
||||
/* parent stack */
|
||||
Avlnode *pptr[sizeof(void *)*8];
|
||||
unsigned char pdir[sizeof(void *)*8];
|
||||
Avlnode *pptr[MAX_TREE_DEPTH];
|
||||
unsigned char pdir[MAX_TREE_DEPTH];
|
||||
int depth = 0;
|
||||
|
||||
if ( *root == NULL )
|
||||
|
Loading…
Reference in New Issue
Block a user