Fix string comparison method

This commit is contained in:
cy023 2022-10-01 23:36:48 +08:00 committed by Man, Jianting (Meco)
parent e43a938ec1
commit f741ccb400
2 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ int rt_hw_openamp_init(void)
rt_hw_openamp_register(&dev_openamp, "openamp", 0, NULL);
if (RT_CONSOLE_DEVICE_NAME == "openamp")
if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "openamp") == 0)
{
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
}

View File

@ -236,7 +236,7 @@ int rt_hw_openamp_init(void)
rt_hw_openamp_register(&dev_openamp, "openamp", 0, NULL);
if (RT_CONSOLE_DEVICE_NAME == "openamp")
if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "openamp") == 0)
{
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
}