note negative adjustments as negative, and clear buffer before sending Reference: /n/atom/patch/applied/fssntpclean Date: Wed Apr 16 04:13:40 CES 2014 Signed-off-by: quanstro@quanstr.net --- /sys/src/fs/ip/sntp.c Wed Apr 16 04:10:17 2014 +++ /sys/src/fs/ip/sntp.c Wed Apr 16 04:10:18 2014 @@ -117,9 +117,7 @@ if(dt = now-time()){ settime(now); setrtc(now); - if(dt < 0) - dt = -dt; - if(dt > 1 || (cons.flags&sntp.flag)) + if(abs(dt) > 1 || (cons.flags&sntp.flag)) print("sntp: %t [adjust %+ld]\n", now, (long)dt); } sntp.gotreply = 1; @@ -158,6 +156,7 @@ /* compose a UDP sntp request */ dprint("sntp: sending to %I on ifc %I\n", sntpip, ifc->ipa); mb = mballoc(Ensize+Ipsize+Udpsize+Sntpsize, 0, Mbsntp); + memset(mb->data, 0, Ensize+Ipsize+Udpsize+Sntpsize); s = (Sntppkt*)mb->data; /* IP fields */ memmove(s->src, ifc->ipa, Pasize); --- /sys/src/fs/mkfile Wed Apr 16 04:10:19 2014 +++ /sys/src/fs/mkfile Wed Apr 16 04:10:20 2014 @@ -1,7 +1,6 @@ ARCH=\ aska\ buda\ - dahlonega\ fairyland\ fs64\ fs\