- Fix unused variable compile warning for kernel timestamps in

netevent.c
This commit is contained in:
George Thessalonikefs 2023-07-28 20:17:07 +02:00
parent 1e47eea6e3
commit 373904f865
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
28 July 2023: George
- Fix unused variable compile warning for kernel timestamps in
netevent.c
21 July 2023: George
- Merge #857 from eaglegai: fix potential memory leaks when errors
happen.

View file

@ -846,7 +846,9 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg)
#ifndef S_SPLINT_S
struct cmsghdr* cmsg;
#endif /* S_SPLINT_S */
#ifdef HAVE_LINUX_NET_TSTAMP_H
struct timespec *ts;
#endif /* HAVE_LINUX_NET_TSTAMP_H */
rep.c = (struct comm_point*)arg;
log_assert(rep.c->type == comm_udp);
@ -921,7 +923,7 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg)
} else if( cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SO_TIMESTAMP) {
memmove(&rep.c->recv_tv, CMSG_DATA(cmsg), sizeof(struct timeval));
#endif
#endif /* HAVE_LINUX_NET_TSTAMP_H */
}
}