home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8ae37
)
Avoid doing arithmetic on a void pointer.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 10 Mar 2014 14:56:42 +0000
(15:56 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 10 Mar 2014 14:56:42 +0000
(15:56 +0100)
src/client/misc.c
patch
|
blob
|
history
diff --git
a/src/client/misc.c
b/src/client/misc.c
index 9d7539edec9c2f1a895cb2677685301d04d3fa28..45482ad2ac6e0c74c6131b80d8653b7b58c5be61 100644
(file)
--- a/
src/client/misc.c
+++ b/
src/client/misc.c
@@
-162,7
+162,7
@@
extern void array_append(uint32_t old_n, size_t region_size, void * new_region,
char * f_name = "array_append()";
uint32_t old_size = old_n * region_size;
uint32_t new_size = old_size + region_size;
-
void
* new_array = try_malloc(new_size, f_name);
+
char
* new_array = try_malloc(new_size, f_name);
memcpy(new_array, * ptr_old_array, old_size);
memcpy(new_array + (old_n * region_size), new_region, region_size);
free(* ptr_old_array);