]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: update setting of socket option
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 21 Aug 2019 07:12:33 +0000 (09:12 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 27 Aug 2019 15:11:49 +0000 (17:11 +0200)
ntp_io_linux.c

index 59b19ce6557299002649111a42006350f1421cc1..6519791fc0b468d2e3547c1e024853facde74b95 100644 (file)
@@ -324,8 +324,7 @@ check_timestamping_option(int option)
   if (sock_fd < 0)
     return 0;
 
-  if (setsockopt(sock_fd, SOL_SOCKET, SO_TIMESTAMPING, &option, sizeof (option)) < 0) {
-    DEBUG_LOG("Could not enable timestamping option %x", (unsigned int)option);
+  if (!SCK_SetIntOption(sock_fd, SOL_SOCKET, SO_TIMESTAMPING, option)) {
     SCK_CloseSocket(sock_fd);
     return 0;
   }