]> sjero.net Git - wget/commitdiff
Ensure it doesn't print more IPs than available ones.
authorJochen Roderburg <Roderburg@Uni-Koeln.DE>
Sat, 6 Aug 2011 21:28:42 +0000 (23:28 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sat, 6 Aug 2011 21:28:42 +0000 (23:28 +0200)
src/ChangeLog
src/host.c

index 1b42b0203eb8b4a1a7cdeeb4b0763eca918c664c..d7934d72256970b2e87716d40181995e3b3f0879 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-06  Jochen Roderburg <Roderburg@Uni-Koeln.DE>
+
+       * host.c (lookup_host): Ensure it doesn't print more IPs than available
+       ones.
+
 2011-08-06  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * init.c (defaults): Set default value for show_all_dns_entries.
 2011-08-06  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * init.c (defaults): Set default value for show_all_dns_entries.
index 505f706c02a75233593f6a6e134a085193019dcb..86f107a302bc57ae0f2767a806f09d3978424e9a 100644 (file)
@@ -828,8 +828,8 @@ lookup_host (const char *host, int flags)
       int i;
       int printmax = al->count;
 
       int i;
       int printmax = al->count;
 
-      if (! opt.show_all_dns_entries)
-        printmax = 3;
+      if (!opt.show_all_dns_entries && printmax > 3)
+          printmax = 3;
 
       for (i = 0; i < printmax; i++)
         {
 
       for (i = 0; i < printmax; i++)
         {