X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/069c185c6386ddd0a43d3cd4bed99c69884afbfe..876b4f53ca713ab45a1b99d5cce8b90da7e2315f:/pixie.c diff --git a/pixie.c b/pixie.c index ee7d953..a6b7e05 100644 --- a/pixie.c +++ b/pixie.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pixie.c,v 1.1 1999/12/22 15:58:41 mdw Exp $ + * $Id: pixie.c,v 1.3 1999/12/22 22:14:40 mdw Exp $ * * Passphrase pixie for Catacomb * @@ -30,6 +30,12 @@ /*----- Revision history --------------------------------------------------* * * $Log: pixie.c,v $ + * Revision 1.3 1999/12/22 22:14:40 mdw + * Only produce initialization message if verbose. + * + * Revision 1.2 1999/12/22 22:13:42 mdw + * Fix bug in passphrase flushing loop. + * * Revision 1.1 1999/12/22 15:58:41 mdw * Passphrase pixie support. * @@ -311,7 +317,9 @@ static void p_flush(const char *tag) if (!tag && verbose > 1) log("flushing all passphrases"); - for (p = P_ROOT->next; p != P_ROOT; p = p->next) { + p = P_ROOT->next; + while (p != P_ROOT) { + phrase *pp = p->next; if (!tag) p_free(p); else if (strcmp(p->tag, tag) == 0) { @@ -320,6 +328,7 @@ static void p_flush(const char *tag) p_free(p); break; } + p = pp; } } @@ -1265,7 +1274,8 @@ int main(int argc, char *argv[]) _exit(0); } - log("initialized ok"); + if (verbose) + log("initialized ok"); for (;;) sel_select(&sel); return (0);