mraa.c: fix char count in board_name
authorBrendan Le Foll <brendan.le.foll@intel.com>
Thu, 20 Nov 2014 15:00:55 +0000 (15:00 +0000)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Thu, 20 Nov 2014 15:08:31 +0000 (15:08 +0000)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/mraa.c

index 5b672db..fbd8124 100644 (file)
@@ -87,11 +87,11 @@ mraa_init()
     FILE *fh = fopen("/sys/devices/virtual/dmi/id/board_name", "r");
     if (fh != NULL) {
         if (getline(&line, &len, fh) != -1) {
-            if (strncmp(line, "GalileoGen2", 10) == 0) {
+            if (strncmp(line, "GalileoGen2", 11) == 0) {
                 platform_type = MRAA_INTEL_GALILEO_GEN2;
             } else if (strncmp(line, "BODEGA BAY", 10) == 0) {
                 platform_type = MRAA_INTEL_EDISON_FAB_C;
-            } else if (strncmp(line, "SALT BAY", 7) == 0) {
+            } else if (strncmp(line, "SALT BAY", 8) == 0) {
                 platform_type = MRAA_INTEL_EDISON_FAB_C;
             } else if (strncmp(line, "DE3815", 6) == 0) {
                 platform_type = MRAA_INTEL_DE3815;