Fix calloc parameter order.

* Set correct calloc parameters order(num, size)

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Boris Barbulovski 2014-02-10 16:04:37 +01:00 committed by Dirk Hohndel
parent e7eb06d78c
commit 772c9fb0b1
2 changed files with 2 additions and 2 deletions

View file

@ -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 *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; dive_trip->when = dive->when;
if (dive->location) if (dive->location)
dive_trip->location = strdup(dive->location); dive_trip->location = strdup(dive->location);

View file

@ -1277,7 +1277,7 @@ static void trip_start(void)
if (cur_trip) if (cur_trip)
return; return;
dive_end(); 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)); memset(&cur_tm, 0, sizeof(cur_tm));
} }