progs/key.c: Exit with `EXIT_FAILURE' on keyring open failure.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 29 May 2015 17:47:59 +0000 (18:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 29 May 2015 17:54:59 +0000 (18:54 +0100)
Portability fix for a careless error.

progs/key.c

index fe5f313..83d27e5 100644 (file)
@@ -100,8 +100,10 @@ static const char *keyfile = "keyring";
 
 static void doopen(key_file *f, unsigned how)
 {
-  if (key_open(f, keyfile, how, key_moan, 0))
-    die(1, "couldn't open keyring `%s': %s", keyfile, strerror(errno));
+  if (key_open(f, keyfile, how, key_moan, 0)){
+    die(EXIT_FAILURE, "couldn't open keyring `%s': %s",
+       keyfile, strerror(errno));
+  }
 }
 
 /* --- @doclose@ --- *