chiark / gitweb /
+ * Regression tests now include adnshost, adnslogres, adnsresfilter.
[adns.git] / client / adnsresfilter.c
index 02d0f4c2e4a35d0062dec2e6ae7c45c15caba017..82aac8463693622fc68be3e8fe086dd956bb338d 100644 (file)
@@ -127,6 +127,7 @@ static void usage(void) {
             "Timeout is the maximum amount to delay any particular bit of output for.\n"
             "Lookups will go on in the background.  Default timeout = 1000 (ms).\n")
       == EOF) outputerr();
+  if (fflush(stdout)) sysfail("flush stdout");
 }
 
 static void usageerr(const char *why) NONRETURNING;
@@ -467,7 +468,6 @@ int main(int argc, const char *const *argv) {
   }
   if (nonblock(0,0)) sysfail("un-nonblock stdin");
   if (nonblock(1,0)) sysfail("un-nonblock stdout");
-  if (ferror(stdin) || fclose(stdin)) sysfail("read stdin");
-  if (fclose(stdout)) sysfail("close stdout");
+  adns_finish(ads);
   exit(0);
 }