Remove the unnecessary cast for main_t, NULL and argv

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-10-16 01:48:35 +08:00
committed by Alin Jerpelea
parent 7923ea3bef
commit 6b31918b42
113 changed files with 149 additions and 159 deletions
+2 -3
View File
@@ -258,8 +258,7 @@
(CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#define __CMSG_FIRSTHDR(ctl, len) \
((len) >= sizeof(struct cmsghdr) ? (FAR struct cmsghdr *)(ctl) : \
(FAR struct cmsghdr *)NULL)
((len) >= sizeof(struct cmsghdr) ? (FAR struct cmsghdr *)(ctl) : NULL)
#define CMSG_FIRSTHDR(msg) \
__CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
@@ -345,7 +344,7 @@ static inline FAR struct cmsghdr *__cmsg_nxthdr(FAR void *__ctl,
(((FAR char *)__cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
if ((unsigned long)((FAR char *)(__ptr + 1) - (FAR char *)__ctl) > __size)
{
return (FAR struct cmsghdr *)NULL;
return NULL;
}
return __ptr;