get rid of void pointer arithmatic and signed vs unsigned comparison

This commit is contained in:
Jeff Becker 2020-08-25 08:41:38 -04:00
parent fc75da174e
commit bc40453100
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 2 additions and 2 deletions

View File

@ -94,11 +94,11 @@ namespace llarp::net
/* */
#define NLMSG_TAIL(nmsg) ((struct rtattr*)(((void*)(nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
#define NLMSG_TAIL(nmsg) ((struct rtattr*)(((intptr_t)(nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
/* Add new data to rtattr */
int
rtattr_add(struct nlmsghdr* n, int maxlen, int type, const void* data, int alen)
rtattr_add(struct nlmsghdr* n, unsigned int maxlen, int type, const void* data, int alen)
{
int len = RTA_LENGTH(alen);
struct rtattr* rta;