commit | 610e8554965fd94ea09d90005ad21acc66cfe3ac | [log] [tgz] |
---|---|---|
author | htbegin <hotforest@gmail.com> | Fri Mar 01 23:00:34 2013 +0000 |
committer | Scott Wood <scottwood@freescale.com> | Wed May 22 16:50:59 2013 -0500 |
tree | 8ffda41510fae2a2f91967e096dc3e368e4ee74f | |
parent | 64214b218584a4434ae61d398d96873a984ea631 [diff] |
mtd: nand: use ssize_t instead of size_t to prevent infinite loop When a all 0xFF buffer is passed to drop_ffs, the no-0xFF check loop will loop forever. After the fix, If ssize_t i = -1 and size_t l = i + 1, the value of l will still be 0 as expected. Signed-off-by: Tao Hou <hotforest@gmail.com> Cc: Ben Gardiner <bengardiner@nanometrics.ca> Cc: Scott Wood <scottwood@freescale.com>