]> diplodocus.org Git - nmh/blobdiff - sbr/message_id.c
test/inc/test-eom-align: Fix tests; they've never worked.
[nmh] / sbr / message_id.c
index ce65ed9c9688a9c541ccf189df19089f2e6527a4..aaaab322efbca4870da1023bc5b41ae68bb33ea3 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * message-id.c -- construct the body of a Message-ID or Content-ID
+/* message_id.c -- construct the body of a Message-ID or Content-ID
  *                 header field
  *
  * This code is Copyright (c) 2012, by the authors of nmh.  See the
@@ -8,9 +7,9 @@
  */
 
 #include <h/mh.h>
-#include <unistd.h>    /* for getpid() */
+#include "m_rand.h"
+#include "message_id.h"
 #include <sys/time.h>  /* for gettimeofday() */
-#include <stdio.h>
 
 
 static enum {
@@ -26,12 +25,12 @@ save_message_id_style (const char *value) {
   if (! strcasecmp (value, "localname")) {
     message_id_style = NMH_MESSAGE_ID_LOCALNAME;
     return 0;
-  } else if (! strcasecmp (value, "random")) {
+  }
+  if (! strcasecmp (value, "random")) {
     message_id_style = NMH_MESSAGE_ID_RANDOM;
     return 0;
-  } else {
-    return 1;
   }
+  return 1;
 }