overzealous use of errx() hides useful information about the error.

Index: bioctl.c
===================================================================
RCS file: /cvs/src/sbin/bioctl/bioctl.c,v
retrieving revision 1.130
diff -u -p -r1.130 bioctl.c
--- bioctl.c    4 Feb 2016 08:31:26 -0000       1.130
+++ bioctl.c    13 May 2016 18:59:36 -0000
@@ -1299,7 +1299,7 @@ derive_key_pkcs(int rounds, u_int8_t *ke
        } else {
                if (readpassphrase(prompt, passphrase, sizeof(passphrase),
                    rpp_flag) == NULL)
-                       errx(1, "unable to read passphrase");
+                       err(1, "unable to read passphrase");
        }
 
        if (verify && !password) {
@@ -1307,7 +1307,7 @@ derive_key_pkcs(int rounds, u_int8_t *ke
                if (readpassphrase("Re-type passphrase: ", verifybuf,
                    sizeof(verifybuf), rpp_flag) == NULL) {
                        explicit_bzero(passphrase, sizeof(passphrase));
-                       errx(1, "unable to read passphrase");
+                       err(1, "unable to read passphrase");
                }
                if ((strlen(passphrase) != strlen(verifybuf)) ||
                    (strcmp(passphrase, verifybuf) != 0)) {

Reply via email to