From 21267897368c8598cc294b73d504be54cce3602c Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 19 Jan 2017 15:37:13 -0500 Subject: raspberrypi: fix math inside of sizeof Move the subtraction of 1 for terminator outside of sizeof operator. Closes #2731. --- c/src/lib/libbsp/arm/raspberrypi/console/console_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3