Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/drivers/include/drivers/serial_dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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, ' '); \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rt_strchrnul,这个API没有吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有

(arg = strtok_r(arg, ",", &context)) && arg < context_end; \
arg = RT_NULL)

Expand Down
Loading