Skip to content

Commit

Permalink
- Fix unused variable compile warning for kernel timestamps in
Browse files Browse the repository at this point in the history
  netevent.c
  • Loading branch information
gthess committed Jul 28, 2023
1 parent 1e47eea commit 373904f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion util/netevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
}
}

Expand Down

0 comments on commit 373904f

Please sign in to comment.