From: Hallvard Furuseth Date: Thu, 22 May 2003 21:52:02 +0000 (+0000) Subject: Don't do pointer arithmetic on void pointers. X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~76 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d3d9fe027b159a89b84b24f7ee621d3334bd179;p=openldap Don't do pointer arithmetic on void pointers. --- diff --git a/servers/slapd/sl_malloc.c b/servers/slapd/sl_malloc.c index 11defd06d4..947e2967a1 100644 --- a/servers/slapd/sl_malloc.c +++ b/servers/slapd/sl_malloc.c @@ -79,7 +79,7 @@ sl_mem_detach( ) { struct slab_heap *sh = memctx; - int size = sh->h_end - sh->h_base; + int size = (char *) sh->h_end - (char *) sh->h_base; sh->h_base = ch_realloc( sh->h_base, size );