chiark / gitweb /
rename recentact to lowvol
[inn-innduct.git] / lib / remopen.c
index dfe08654dec98661287e1aaded6cc31cbf618f35..595f620ac1345371cb76d84996fe07b8a3007296 100644 (file)
@@ -21,7 +21,7 @@
 /*
 ** store an error message in buff like libinn(3) says NNTPconnect does
 */
-static void store_error(char *buff, char *string1, char *string2) {
+static void store_error(char *buff, const char *string1, const char *string2) {
     /* we put these in [...] to make it easier to tell them apart
      * from messages sent by the server */
     snprintf(buff, NNTP_STRLEN, "[%s%s]", string1, string2);
@@ -209,7 +209,7 @@ int NNTPconnect(char *host, int port, FILE **FromServerp, FILE **ToServerp, char
            return -1;
        }
        if (fgets(buff, sizeof mybuff, F) == NULL) {
-           if (ferror(F)) store_error(buff, "peer closed connection","");
+           if (!ferror(F)) store_error(buff, "peer closed connection","");
            else store_error(buff, "fgets failed: ", strerror(errno));
            oerrno = errno;
            fclose(F);