[ntpsec commit] A minor efficiency hack.

Eric S. Raymond esr at ntpsec.org
Wed Oct 21 01:38:30 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    a75c9f707376b52dd45388e03afb12dd632ba19a
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=a75c9f707376b52dd45388e03afb12dd632ba19a

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Tue Oct 20 21:38:09 2015 -0400

A minor efficiency hack.

---

 ntpfrob/jitter.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ntpfrob/jitter.c b/ntpfrob/jitter.c
index 782b58f..c70f2f8 100644
--- a/ntpfrob/jitter.c
+++ b/ntpfrob/jitter.c
@@ -98,6 +98,9 @@ void jitter(const iomode mode)
 			printf("%13.9f\n", gtod[i]);
 		average += gtod[i];
 	}
+
+	if (mode == raw)
+	    exit(0);
 	
 	/*
 	 * Sort the gtod array and display deciles
@@ -131,6 +134,8 @@ void jitter(const iomode mode)
 		for (i = NBUF - 12; i < NBUF - 2; i++)
 		    fprintf(stdout, "%2d %13.9f\n", i, gtod[i]);
 	}
+
+	exit(0);
 }
 
 /* end */



More information about the vc mailing list