]> diplodocus.org Git - nmh/blobdiff - test/fakehttp.c
mhbuildsbr.c: Don't free(3) string then print it; do reverse.
[nmh] / test / fakehttp.c
index 38671f7..b18eb23 100644 (file)
@@ -15,7 +15,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#define LINESIZE 1024
 #define PIDFN "/tmp/fakehttp.pid"
 
 int serve(const char *, const char *);
@@ -68,7 +67,7 @@ save_req(int conn, FILE *req)
         }
         if (r < 0) {
             e = errno;
-            fputs("\n", req);   /* req body usually has no newline */
+            putc('\n', req);   /* req body usually has no newline */
             fclose(req);
             if (e != EAGAIN && e != EWOULDBLOCK) {
                 fprintf(stderr, "Unable to read socket: %s\n", strerror(e));