projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't increment/change a void *, cast to char * (thanks GCC!)
[unix-history]
/
usr
/
src
/
lib
/
libc
/
db
/
hash
/
hash.c
diff --git
a/usr/src/lib/libc/db/hash/hash.c
b/usr/src/lib/libc/db/hash/hash.c
index
f41d2f3
..
1cf2877
100644
(file)
--- a/
usr/src/lib/libc/db/hash/hash.c
+++ b/
usr/src/lib/libc/db/hash/hash.c
@@
-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;
}