api/platform_name: Change return when null platform
Easier to error check against Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -303,8 +303,9 @@ mraa_adc_supported_bits()
|
||||
char*
|
||||
mraa_get_platform_name()
|
||||
{
|
||||
if (plat == NULL)
|
||||
return "Unknown";
|
||||
if (plat == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
return (char*) plat->platform_name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user