]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't use uninitialized value in receive_packet()
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 5 Jun 2013 07:56:37 +0000 (09:56 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 5 Jun 2013 07:56:37 +0000 (09:56 +0200)
ntp_core.c

index 96441a2942757ae7285b70e351e0254da39d0ea3..228c0873a068fdaec422b2bbb1f368474ea871d0 100644 (file)
@@ -945,7 +945,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
        properly (e.g. for the first sample received in a peering
        connection). */
     theta = delta = epsilon = 0.0;
-
+    sample_time = *now;
   }
   
   peer_distance = epsilon + 0.5 * fabs(delta);