aboutsummaryrefslogtreecommitdiffstats
path: root/epan/emem.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-01-10 09:01:35 +0000
committerGuy Harris <guy@alum.mit.edu>2006-01-10 09:01:35 +0000
commitc38b12da6d340ef7a7124238a6060f627f5a9362 (patch)
tree20912e1e550a6c2d5cc4cb40857abf9654ae253a /epan/emem.c
parentc919d31d092f2cc82fc325a8f925d719bda61c08 (diff)
Allowing pointer arithmetic on "void *"s is a GCCism; cast "void *"s to
"char *" before adding an offset to them. svn path=/trunk/; revision=16985
Diffstat (limited to 'epan/emem.c')
-rw-r--r--epan/emem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/emem.c b/epan/emem.c
index 9e752d1b95..b60bdf3678 100644
--- a/epan/emem.c
+++ b/epan/emem.c
@@ -201,7 +201,7 @@ ep_alloc(size_t size)
ep_packet_mem.free_list->amount_free-=size;
ep_packet_mem.free_list->free_offset+=size;
- cptr = buf + size - EMEM_CANARY_SIZE;
+ cptr = (char *)buf + size - EMEM_CANARY_SIZE;
ep_packet_mem.free_list->canary[ep_packet_mem.free_list->c_count] = cptr;
memcpy(cptr, &ep_canary, EMEM_CANARY_SIZE);
ep_packet_mem.free_list->c_count++;
@@ -262,7 +262,7 @@ se_alloc(size_t size)
se_packet_mem.free_list->amount_free-=size;
se_packet_mem.free_list->free_offset+=size;
- cptr = buf + size - EMEM_CANARY_SIZE;
+ cptr = (char *)buf + size - EMEM_CANARY_SIZE;
se_packet_mem.free_list->canary[se_packet_mem.free_list->c_count] = cptr;
memcpy(cptr, &se_canary, EMEM_CANARY_SIZE);
se_packet_mem.free_list->c_count++;