OSDN Git Service

STPK-1429 Fix erroneous buffer size
authorPatrick Porlan <patrick.porlan@intel.com>
Fri, 30 May 2014 12:46:35 +0000 (14:46 +0200)
committersuyyala <sridhar.uyyala@intel.com>
Sat, 7 Jun 2014 16:37:15 +0000 (09:37 -0700)
commit54d334999a128b7fdab7fc6c47362b7adf116155
treee99d58d25dc20fd46b69b2e8da16303fe759029a
parentf052d7d48e10fdf2f396e18de18567ab4421461b
STPK-1429 Fix erroneous buffer size

Not sure what I had in mind with that multiplication. Anyway, the
buffer is zero-initialized, so keep it at a reasonable size, which
is to say... 32. That's plenty enough for now, as the maximum we
encountered is 20 (accel x,y,z 16 bits + gyro x,y,z + 64 bits ts).

We don't need the expected data size calculation, because the
values are set to zero by default, and because that sum would not
be correct anyway in the case where fields such as the timestamp
are shared between sensors. Plus, we were not even verifying that
the computed sum did really fit our buffer.

Issue: STPK-1429

Change-Id: Ie001ceeb634866a1460444bb839918045b72de31
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
control.c