[POWERPC] wrapper: Rename offset in offset_devp()
authorScott Wood <scottwood@freescale.com>
Tue, 11 Dec 2007 21:23:04 +0000 (08:23 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 20 Dec 2007 05:11:46 +0000 (16:11 +1100)
fdt_wrapper_create_node passes a variable called offset to offset_devp(),
which uses said parameter to initialize a local variable called offset.

Due to one of the odder aspects of the C language, the result is an
undefined variable, with no error or warning.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/libfdt-wrapper.c

index 002da16c97c18dac1b7573bb8b41821e412851b9..868c5049a80b71eef96a0da0f6626c86c019eef9 100644 (file)
@@ -44,8 +44,8 @@
 
 #define offset_devp(off)       \
        ({ \
-               int offset = (off); \
-               check_err(offset) ? NULL : (void *)(offset+1); \
+               int _offset = (off); \
+               check_err(_offset) ? NULL : (void *)(_offset+1); \
        })
 
 #define devp_offset(devp)      (((int)(devp))-1)