diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-11-24 13:57:42 -0500 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-11-24 13:57:42 -0500 |
commit | 3edabee2ed22ee4f98f4b4bb38a41059226a8446 (patch) | |
tree | 18b13a940115d81841868e69782b336cabc4fed9 /arch/x86/xen/enlighten.c | |
parent | 4d658d13c90f14cf3510ca15cafe2f4aa9e23d64 (diff) | |
download | linux-3edabee2ed22ee4f98f4b4bb38a41059226a8446.tar.gz linux-3edabee2ed22ee4f98f4b4bb38a41059226a8446.tar.bz2 linux-3edabee2ed22ee4f98f4b4bb38a41059226a8446.zip |
arch/tile: fix memchr() not to dereference memory for zero length
This change fixes a bug that memchr() will read the first word
of the source even if the length is zero. Ironically, the code
was originally written with a test to avoid exactly this problem,
but to make the code conform to Linux coding standards with all
declarations preceding all statements, the first load from memory
was moved up above that test as the initial value for a variable.
The change just moves all the variable declarations to the top
of the file, with no initializers, so that the test can also be
at the top of the file.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
0 files changed, 0 insertions, 0 deletions