summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/dig/dig.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/bin/dig/dig.c')
-rw-r--r--contrib/bind/bin/dig/dig.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/bind/bin/dig/dig.c b/contrib/bind/bin/dig/dig.c
index 8d5f5be..de192e0 100644
--- a/contrib/bind/bin/dig/dig.c
+++ b/contrib/bind/bin/dig/dig.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char rcsid[] = "$Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $";
+static const char rcsid[] = "$Id: dig.c,v 8.42 2000/07/17 07:36:52 vixie Exp $";
#endif
/*
@@ -167,6 +167,7 @@ static const char rcsid[] = "$Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $";
#include <isc/dst.h>
+#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -348,6 +349,7 @@ main(int argc, char **argv) {
res.id = 1;
gettimeofday(&tv1, NULL);
+ assert(tv1.tv_usec >= 0 && tv1.tv_usec < 1000000);
/*
* Main section: once if cmd-line query
@@ -848,6 +850,7 @@ main(int argc, char **argv) {
if (res.pfcode & RES_PRF_HEAD1)
fp_resstat(&res, stdout);
(void) gettimeofday(&start_time, NULL);
+ assert(start_time.tv_usec >= 0 && start_time.tv_usec < 1000000);
if (keyfile)
n = res_nsendsigned(&res, packet, n, &key, answer, sizeof answer);
else
@@ -872,6 +875,7 @@ main(int argc, char **argv) {
}
}
(void) gettimeofday(&end_time, NULL);
+ assert(end_time.tv_usec >= 0 && end_time.tv_usec < 1000000);
if (res.pfcode & RES_PRF_STATS) {
time_t t;
@@ -905,6 +909,7 @@ main(int argc, char **argv) {
* batches started at different sites somewhat synchronized.
*/
gettimeofday(&tv2, NULL);
+ assert(tv2.tv_usec >= 0 && tv2.tv_usec < 1000000);
delay = (int)(tv2.tv_sec - tv1.tv_sec);
if (delay < wait) {
sleep(wait - delay);
@@ -949,7 +954,7 @@ where: server,\n\
fputs("\
notes: defname and search don't work; use fully-qualified names.\n\
this is DiG version " VSTRING "\n\
- $Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $\n\
+ $Id: dig.c,v 8.42 2000/07/17 07:36:52 vixie Exp $\n\
", stderr);
}
OpenPOWER on IntegriCloud