mptable: Fix 'mptable.c:1019:12: warning: ‘c’ may be used uninitialized in this function'
Change-Id: Icf6968f5bcbbe28c3a2a1d6ee7c1fd0be583f182 Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/1110 Tested-by: build bot (Jenkins)
This commit is contained in:
parent
57f524fd62
commit
09a180230a
|
@ -997,9 +997,7 @@ lookupBusType( char* name )
|
||||||
static void
|
static void
|
||||||
busEntry( void )
|
busEntry( void )
|
||||||
{
|
{
|
||||||
int x;
|
|
||||||
char name[ 8 ];
|
char name[ 8 ];
|
||||||
char c;
|
|
||||||
BusEntry entry;
|
BusEntry entry;
|
||||||
|
|
||||||
/* read it into local memory */
|
/* read it into local memory */
|
||||||
|
@ -1013,12 +1011,9 @@ busEntry( void )
|
||||||
printf( "\t " ); pnstr( entry.busType, 6 ); printf( "\n" );
|
printf( "\t " ); pnstr( entry.busType, 6 ); printf( "\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( x = 0; x < 6; ++x ) {
|
memset(name, '\0', sizeof(name));
|
||||||
// if ( (c = entry.busType[ x ]) == ' ' )
|
strncpy(name, (char *)entry.busType, 6);
|
||||||
//break;
|
|
||||||
name[ x ] = c;
|
|
||||||
}
|
|
||||||
name[ x ] = '\0';
|
|
||||||
busses[ entry.busID ] = lookupBusType( name );
|
busses[ entry.busID ] = lookupBusType( name );
|
||||||
printf("\tsmp_write_bus(mc, %d, \"", entry.busID);
|
printf("\tsmp_write_bus(mc, %d, \"", entry.busID);
|
||||||
pnstr( entry.busType, 6 );
|
pnstr( entry.busType, 6 );
|
||||||
|
|
Loading…
Reference in New Issue