diff options
author | Gedare Bloom <gedare@rtems.org> | 2017-01-19 15:37:13 -0500 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2017-01-19 15:37:13 -0500 |
commit | 21267897368c8598cc294b73d504be54cce3602c (patch) | |
tree | d939b5e4610cfb96a2089cee0969f5d03f324c7d | |
parent | raspberrypi: use signed int for return variable (diff) | |
download | rtems-21267897368c8598cc294b73d504be54cce3602c.tar.bz2 |
raspberrypi: fix math inside of sizeof
Move the subtraction of 1 for terminator outside of
sizeof operator.
Closes #2731.
-rw-r--r-- | c/src/lib/libbsp/arm/raspberrypi/console/console_select.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c b/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c index c038cd9e31..8000a7afc0 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c +++ b/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c @@ -95,7 +95,7 @@ void bsp_console_select( void ) opt = rpi_cmdline_get_arg( "--console=" ); if ( opt ) { - if ( strncmp( opt, "fbcons", sizeof( "fbcons" - 1 ) ) == 0 ) { + if ( strncmp( opt, "fbcons", sizeof( "fbcons" ) - 1 ) == 0 ) { if ( rpi_video_is_initialized() > 0 ) { Console_Port_Minor = BSP_CONSOLE_FB; BSPPrintkPort = BSP_CONSOLE_FB; |