X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/aad5d20016b28bb8c28592c1ebe4213aafaa43c3..2b60a54adb3b0bf5a9b927708085492b816a6015:/sbr/context_save.c diff --git a/sbr/context_save.c b/sbr/context_save.c index 27d55e9e..61aa736f 100644 --- a/sbr/context_save.c +++ b/sbr/context_save.c @@ -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,11 +13,12 @@ #include #include +#include "lock_file.h" void context_save (void) { - register struct node *np; + struct node *np; FILE *out; sigset_t set, oset; int failed_to_lock = 0; @@ -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)