From 87a01bcdfc434f31b7a2a7d5bac85be94ab90526 Mon Sep 17 00:00:00 2001 From: Patrick Porlan Date: Wed, 4 Mar 2015 09:54:20 +0100 Subject: [PATCH] Looks like I inverted the parameters of a memset call I blame the Palm OS MemSet call for confusing me. Change-Id: Id66b8c92d2367ac8a6f3190b8a077f5ed3eb674a Signed-off-by: Patrick Porlan --- accel-calibration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel-calibration.c b/accel-calibration.c index aa67ece..8a21a05 100644 --- a/accel-calibration.c +++ b/accel-calibration.c @@ -181,7 +181,7 @@ void accel_cal_init (int s) } /* Fall back to initial values */ - memset(cal_data, sizeof(accel_cal_t), 0); + memset(cal_data, 0, sizeof(accel_cal_t)); /* Store the parameters that are used with that data set, so we can check them against future version of the code to prevent inadvertent reuse */ cal_data->version = (ACCEL_CALIB_DATA_VERSION << 16) + sizeof(accel_cal_t); -- 2.11.0