]> diplodocus.org Git - nmh/blobdiff - test/fakehttp.c
m_convert.c: Move interface to own file.
[nmh] / test / fakehttp.c
index 38671f7cc00d32ef3d4b5804c2e161702d185ab7..328af80d0cb15c101cf2c19b1267480edc076851 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * fakehttp - A fake HTTP server used by the nmh test suite
+/* fakehttp - A fake HTTP server used by the nmh test suite
  *
  * This code is Copyright (c) 2014, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -15,7 +14,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#define LINESIZE 1024
 #define PIDFN "/tmp/fakehttp.pid"
 
 int serve(const char *, const char *);
@@ -68,7 +66,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));