From 772c9fb0b14240ac6959f99052a7f78cb56c6944 Mon Sep 17 00:00:00 2001 From: Boris Barbulovski Date: Mon, 10 Feb 2014 16:04:37 +0100 Subject: Fix calloc parameter order. * Set correct calloc parameters order(num, size) Signed-off-by: Boris Barbulovski Signed-off-by: Dirk Hohndel --- divelist.c | 2 +- parse-xml.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/divelist.c b/divelist.c index e04807ece..b16c9e513 100644 --- a/divelist.c +++ b/divelist.c @@ -665,7 +665,7 @@ void add_dive_to_trip(struct dive *dive, dive_trip_t *trip) dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive) { - dive_trip_t *dive_trip = calloc(sizeof(dive_trip_t),1); + dive_trip_t *dive_trip = calloc(1, sizeof(dive_trip_t)); dive_trip->when = dive->when; if (dive->location) dive_trip->location = strdup(dive->location); diff --git a/parse-xml.c b/parse-xml.c index f5859ba74..3c536ed4b 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1277,7 +1277,7 @@ static void trip_start(void) if (cur_trip) return; dive_end(); - cur_trip = calloc(sizeof(dive_trip_t),1); + cur_trip = calloc(1, sizeof(dive_trip_t)); memset(&cur_tm, 0, sizeof(cur_tm)); } -- cgit v1.2.3-70-g09d2