]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
CID 739709: Check return status of fcntl() in refclock_datum.c
authorHarlan Stenn <stenn@ntp.org>
Mon, 18 Feb 2013 08:18:18 +0000 (03:18 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 18 Feb 2013 08:18:18 +0000 (03:18 -0500)
bk: 5121e3cax7ZOQm8GzuvSJ0WUDAFYJw

ChangeLog
ntpd/refclock_datum.c

index 77948b80c19ad279c5e17cf1c4f5127a10e3eb8b..15a11af79127e500cabaa191b82eb1b40d2a2bbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 * CID 739708: Check return status of fcntl() in refclock_arc.c.
+* CID 739709: Check return status of fcntl() in refclock_datum.c.
 * CID 739723: Print sizeof as unsigned.
 * CID 971094: Clean up time of check/time of use in check_leap_file().
 (4.2.7p354) 2013/02/10 Released by Harlan Stenn <stenn@ntp.org>
index cdf3569db2452074666fb51ea01ec5d24fd6ad0a..d7ecd0d0bce4d9a0b36e9da04d7643084fe6e2f1 100644 (file)
@@ -251,7 +251,9 @@ datum_pts_start(
 
        datum_pts->PTS_fd = fd;
 
-       fcntl(datum_pts->PTS_fd, F_SETFL, 0); /* clear the descriptor flags */
+       if (-1 == fcntl(datum_pts->PTS_fd, F_SETFL, 0)) /* clear the descriptor flags */
+               msyslog(LOG_ERR, "MSF_ARCRON(%d): fcntl(F_SETFL, 0): %m.\n",
+                       unit);
 
 #ifdef DEBUG_DATUM_PTC
        if (debug)