diff options
| author | zhkag <[email protected]> | 2023-01-06 02:07:06 +0000 |
|---|---|---|
| committer | guo <[email protected]> | 2023-01-09 09:32:07 +0800 |
| commit | a15a5b19a4bc85f2485dbedbdfcea39b22805aed (patch) | |
| tree | 9e71300c99e03879a1548807527ab49678e198c0 /components | |
| parent | 0c3a70548243fb57c4bb313277fdd276be9e4a89 (diff) | |
修复 mq_timedreceive 中 mq_timedreceive 为空时断言
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/posix/ipc/mqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/posix/ipc/mqueue.c b/components/libc/posix/ipc/mqueue.c index ae50582160..c764036455 100644 --- a/components/libc/posix/ipc/mqueue.c +++ b/components/libc/posix/ipc/mqueue.c @@ -254,8 +254,8 @@ ssize_t mq_timedreceive(mqd_t mqdes, return -1; } - - tick = rt_timespec_to_tick(abs_timeout); + if (abs_timeout != RT_NULL) + tick = rt_timespec_to_tick(abs_timeout); result = rt_mq_recv(mqdes->mq, msg_ptr, msg_len, tick); if (result == RT_EOK) |
