sh: Make sure indexes are positive

The indexes are signed, make sure they are not negative
when we read array elements.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Este commit está contenido en:
Roel Kluin
2009-11-02 16:14:42 +00:00
cometido por Paul Mundt
padre c4b973f532
commit 9016332014
Se han modificado 3 ficheros con 3 adiciones y 3 borrados

Ver fichero

@@ -60,7 +60,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
unsigned long bootmem_paddr;
/* Don't allow bogus node assignment */
BUG_ON(nid > MAX_NUMNODES || nid == 0);
BUG_ON(nid > MAX_NUMNODES || nid <= 0);
start_pfn = start >> PAGE_SHIFT;
end_pfn = end >> PAGE_SHIFT;