diff options
author | Jeff Trawick <trawick@apache.org> | 2001-01-09 05:09:43 +0100 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2001-01-09 05:09:43 +0100 |
commit | 37d7b23e1e6cfdd6d4833176ca30a210487f5a90 (patch) | |
tree | 4cf5c029ee3860c4c28f978d9db9139e874e8f44 /support/htdigest.c | |
parent | Reference to the docs project. (diff) | |
download | apache2-37d7b23e1e6cfdd6d4833176ca30a210487f5a90.tar.xz apache2-37d7b23e1e6cfdd6d4833176ca30a210487f5a90.zip |
get rid of a bogus use of perror()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/htdigest.c')
-rw-r--r-- | support/htdigest.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/support/htdigest.c b/support/htdigest.c index 9bdbe8d00c..3162fdc255 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -251,10 +251,13 @@ int main(int argc, char *argv[]) if (argc == 5) { if (strcmp(argv[1], "-c")) usage(); - if (apr_open(&tfp, argv[2], APR_WRITE | APR_CREATE, -1, cntxt) != APR_SUCCESS) { - fprintf(stderr, "Could not open passwd file %s for writing.\n", - argv[2]); - perror("apr_open"); + rv = apr_open(&tfp, argv[2], APR_WRITE | APR_CREATE, -1, cntxt); + if (rv != APR_SUCCESS) { + char errmsg[120]; + + fprintf(stderr, "Could not open passwd file %s for writing: %s\n", + argv[2], + apr_strerror(rv, errmsg, sizeof errmsg)); exit(1); } printf("Adding password for %s in realm %s.\n", argv[4], argv[3]); |