From: Arnaud Giersch Date: Wed, 15 May 2013 16:29:39 +0000 (+0200) Subject: Give size of pointed area, not size of pointer. X-Git-Tag: v3_9_90~382 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/93d06f870b710ab679422e2d1f9f70fd98a9e405?ds=sidebyside Give size of pointed area, not size of pointer. --- diff --git a/src/surf/surf_routing_vivaldi.c b/src/surf/surf_routing_vivaldi.c index 87049c5871..a7e0cce3e4 100644 --- a/src/surf/surf_routing_vivaldi.c +++ b/src/surf/surf_routing_vivaldi.c @@ -102,7 +102,7 @@ static int vivaldi_parse_PU(AS_t rc, sg_routing_edge_t elm) { /* Creation routing model functions */ AS_t model_vivaldi_create(void) { - AS_t new_component = model_generic_create_sized(sizeof(AS_t)); + AS_t new_component = model_generic_create_sized(sizeof *new_component); new_component->get_route_and_latency = vivaldi_get_route_and_latency; new_component->parse_PU = vivaldi_parse_PU;