j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2009-01-13 20:54:29 +0100 (Tue, 13 Jan 2009) New Revision: 403
Modified: openbios-devel/include/openbios/bindings.h openbios-devel/modules/bindings.c Log: Fix warning about shadowing
Modified: openbios-devel/include/openbios/bindings.h =================================================================== --- openbios-devel/include/openbios/bindings.h 2009-01-13 19:31:14 UTC (rev 402) +++ openbios-devel/include/openbios/bindings.h 2009-01-13 19:54:29 UTC (rev 403) @@ -69,8 +69,9 @@
/* device tree iteration */ extern phandle_t dt_iter_begin( void ); -extern phandle_t dt_iterate( phandle_t last ); -extern phandle_t dt_iterate_type( phandle_t last, const char *type ); +extern phandle_t dt_iterate( phandle_t last_tree ); +extern phandle_t dt_iterate_type( phandle_t last_tree, + const char *type ); static inline phandle_t dt_find_type( const char *type ) { return dt_iterate_type( 0, type ); }
Modified: openbios-devel/modules/bindings.c =================================================================== --- openbios-devel/modules/bindings.c 2009-01-13 19:31:14 UTC (rev 402) +++ openbios-devel/modules/bindings.c 2009-01-13 19:54:29 UTC (rev 403) @@ -374,29 +374,29 @@ }
phandle_t -dt_iterate( phandle_t last ) +dt_iterate( phandle_t last_tree ) { - if( !last ) + if( !last_tree ) return dt_iter_begin();
- PUSH_ph( last ); + PUSH_ph( last_tree ); fword("iterate-tree"); return POP_ph(); }
phandle_t -dt_iterate_type( phandle_t last, const char *type ) +dt_iterate_type( phandle_t last_tree, const char *type ) { - if( !last ) - last = dt_iter_begin(); + if( !last_tree ) + last_tree = dt_iter_begin();
/* root node is never matched but we don't care about that */ - while( (last=dt_iterate(last)) ) { - char *s = get_property( last, "device_type", NULL ); + while( (last_tree = dt_iterate(last_tree)) ) { + char *s = get_property( last_tree, "device_type", NULL ); if( s && !strcmp(type, s) ) break; } - return last; + return last_tree; }