From be527d670c50d6bbac90aec41cd87366e16515e4 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Wed, 01 Jun 2022 10:00:01 +0000
Subject: [PATCH] Added input argument for reliability testing

---
 slist.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/slist.c b/slist.c
index 971685f..b4e7ccf 100644
--- a/slist.c
+++ b/slist.c
@@ -133,7 +133,7 @@
     struct dns_list* curr = head;
 	printf("%-16s | %-11s | %s\n", "Server", "Time", "Errors");
 	while (curr) {
-        if (curr->errors != -1) {
+        if (curr->errors >= 0) {
             printf("%-16s | %ld.%09ld | %d\n", curr->server, curr->time.tv_sec,
                    curr->time.tv_nsec, curr->errors);
         }
@@ -141,9 +141,9 @@
 	}
     fflush(stdout);
     curr = head;
-    if (head->errors == -1) {
+    if (head->errors < 0) {
         printf("The following servers were unreachable:\n");
-        while (curr && curr->errors == -1) {
+        while (curr && curr->errors < 0) {
             printf("%s\n", curr->server);
             curr = curr->next;
         }

--
Gitblit v1.10.0