Files
OpenCellular/common
Martin Roth fd355c219f common/i2c.c: Check that i2c port is always 0 or greater
Previously, an assert was checking the port value after the
port value had been converted to the controller.  Instead, verify
that the value is not negative, and return if it is.

The if sequence generates much less code than the ASSERT, and protects
both paths.

Fixes coverity warning 141748: Negative array index read

42 files changed.
Total size change: -1248 bytes.
Average size change: -29 bytes.
These platforms increased in size:
lucid/RO/ec.RO.flat grew by 4 bytes: (64404 to 64408)
lucid/RW/ec.RW.flat grew by 20 bytes: (63996 to 64016)
pyro/RO/ec.RO.flat grew by 120 bytes: (131212 to 131332)
pyro/RW/ec.RW.flat grew by 144 bytes: (130764 to 130908)

TEST=Build
BUG=None
BRANCH=None

Change-Id: I8d39db04c4ca3194f99e17840365429ed2d39390
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/371401
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2016-12-16 15:42:47 -08:00
..
2016-11-08 17:11:28 -08:00
2015-05-19 02:46:27 +00:00
2016-11-15 17:41:53 -08:00
2016-11-15 17:41:53 -08:00
2016-04-27 14:04:07 -07:00
2016-09-07 14:01:18 -07:00
2016-11-08 17:11:28 -08:00
2015-09-25 09:13:34 -07:00
2016-03-02 13:39:47 -08:00
2016-11-15 17:41:53 -08:00
2016-11-08 17:11:28 -08:00
2016-11-15 17:41:53 -08:00
2016-07-29 10:51:22 -07:00
2014-05-17 20:14:17 +00:00
2016-05-05 19:16:50 -07:00
2016-03-21 16:35:33 -07:00
2016-11-08 17:11:28 -08:00
2016-11-02 17:39:56 -07:00
2016-08-22 23:27:24 -07:00
2015-09-24 12:46:28 -07:00