home · contact · privacy
Avoid doing arithmetic on a void pointer.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 10 Mar 2014 14:56:42 +0000 (15:56 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 10 Mar 2014 14:56:42 +0000 (15:56 +0100)
src/client/misc.c

index 9d7539edec9c2f1a895cb2677685301d04d3fa28..45482ad2ac6e0c74c6131b80d8653b7b58c5be61 100644 (file)
@@ -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);