]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - url.c
Output only two sets of messages when fclose fails
[thirdparty/sarg.git] / url.c
diff --git a/url.c b/url.c
index ca2318cafeb6c14423fe3a0370296a420b8899f7..f24ce71d01c94c8fcd954b612347f418ee0d0f45 100644 (file)
--- a/url.c
+++ b/url.c
@@ -598,7 +598,10 @@ void read_hostalias(const char *Filename)
        }
 
        longline_destroy(&line);
-       fclose(fi);
+       if (fclose(fi)==EOF) {
+               debuga(_("Read error in \"%s\": %s\n"),Filename,strerror(errno));
+               exit(EXIT_FAILURE);
+       }
 
        if (debug) {
                struct hostalias_name *alias1;