]> diplodocus.org Git - nmh/blobdiff - sbr/context_save.c
Add ENDNULL macro for gcc's `sentinel' function attribute.
[nmh] / sbr / context_save.c
index 62bc48e66ddd3b5a7b3b0293566adeb12d9fb84e..61aa736ffcf65ba790b18040a0973134d29c6a65 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * context_save.c -- write out the updated context file
+/* context_save.c -- write out the updated context file
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -15,6 +13,7 @@
 
 #include <h/mh.h>
 #include <h/signals.h>
+#include "lock_file.h"
 
 void
 context_save (void)
@@ -41,11 +40,9 @@ context_save (void)
     sigprocmask (SIG_BLOCK, &set, &oset);
 
     if (!(out = lkfopendata (ctxpath, "w", &failed_to_lock))) {
-       if (failed_to_lock) {
+       if (failed_to_lock)
            adios (ctxpath, "failed to lock");
-       } else {
-           adios (ctxpath, "unable to write");
-       }
+        adios (ctxpath, "unable to write");
     }
     for (np = m_defs; np; np = np->n_next)
        if (np->n_context)