summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-08-28 20:47:45 +0000
committerMiles Bader <miles@gnu.org>1997-08-28 20:47:45 +0000
commit532e85c18d0533395b976b17c952a2423b29f8ae (patch)
tree610fbbc2297866ea0d40e8058804c0f2fb6109c6
parent30939a9122ff9b0cea1a845015878279abd56738 (diff)
(parse_common_opt):
Turn on debugging when there *aren't* any errors...
-rw-r--r--ftpfs/ftpfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c
index bef0dbd0..3cc16a6c 100644
--- a/ftpfs/ftpfs.c
+++ b/ftpfs/ftpfs.c
@@ -139,6 +139,7 @@ static const struct argp_option common_options[] =
static error_t
parse_common_opt (int key, char *arg, struct argp_state *state)
{
+ error_t err = 0;
struct ftpfs_params *params = state->input;
switch (key)
@@ -168,7 +169,7 @@ parse_common_opt (int key, char *arg, struct argp_state *state)
debug_stream = fopen (arg, "w+");
if (! debug_stream)
{
- error_t err = errno;
+ err = errno;
argp_failure (state, 0, err, "%s: Cannot open debugging file", arg);
}
}
@@ -176,7 +177,7 @@ parse_common_opt (int key, char *arg, struct argp_state *state)
else
debug_stream = stderr;
- if (err)
+ if (! err)
ftpfs_ftp_hooks.cntl_debug = cntl_debug;
mutex_unlock (&debug_lock);