[components][drivers]fix compiler error in serial dm (#8927)

fix compiler error in serial dm
This commit is contained in:
zms123456 2024-05-11 11:16:26 +08:00 committed by GitHub
parent b3277fa704
commit 151a96cb88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
#include <rtthread.h>
#include <rtdevice.h>
#include <string.h>
#include <posix/string.h>
int serial_dev_set_name(struct rt_serial_device *sdev);
@ -22,7 +22,7 @@ struct serial_configure serial_cfg_from_args(char *str);
#define serial_for_each_args(arg, args) \
for (char *context = (arg = (typeof(arg))args, (void *)RT_NULL), \
*context_end = rt_strchrnul((char *)args, ' '); \
*context_end = strchrnul((char *)args, ' '); \
(arg = strtok_r(arg, ",", &context)) && arg < context_end; \
arg = RT_NULL)