don't increment/change a void *, cast to char * (thanks GCC!)
[unix-history] / usr / src / lib / libc / db / hash / hash.c
index f41d2f3..1cf2877 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c     8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash.c     8.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -839,7 +839,7 @@ hash_realloc(p_ptr, oldsize, newsize)
 
        if (p = malloc(newsize)) {
                memmove(p, *p_ptr, oldsize);
 
        if (p = malloc(newsize)) {
                memmove(p, *p_ptr, oldsize);
-               memset(p + oldsize, 0, newsize - oldsize);
+               memset((char *)p + oldsize, 0, newsize - oldsize);
                free(*p_ptr);
                *p_ptr = p;
        }
                free(*p_ptr);
                *p_ptr = p;
        }