OSDN Git Service

Looks like I inverted the parameters of a memset call
authorPatrick Porlan <patrick.porlan@intel.com>
Wed, 4 Mar 2015 08:54:20 +0000 (09:54 +0100)
committerAdriana Reus <adriana.reus@intel.com>
Mon, 9 Mar 2015 10:14:29 +0000 (12:14 +0200)
I blame the Palm OS MemSet call for confusing me.

Change-Id: Id66b8c92d2367ac8a6f3190b8a077f5ed3eb674a
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
accel-calibration.c

index aa67ece..8a21a05 100644 (file)
@@ -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);