[rtems commit] raspberrypi: fix math inside of sizeof
    Gedare Bloom 
    gedare at rtems.org
       
    Thu Jan 19 20:38:52 UTC 2017
    
    
  
Module:    rtems
Branch:    master
Commit:    21267897368c8598cc294b73d504be54cce3602c
Changeset: http://git.rtems.org/rtems/commit/?id=21267897368c8598cc294b73d504be54cce3602c
Author:    Gedare Bloom <gedare at rtems.org>
Date:      Thu Jan 19 15:37:13 2017 -0500
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 c038cd9..8000a7a 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;
    
    
More information about the vc
mailing list