From 532e85c18d0533395b976b17c952a2423b29f8ae Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 28 Aug 1997 20:47:45 +0000 Subject: (parse_common_opt): Turn on debugging when there *aren't* any errors... --- ftpfs/ftpfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ftpfs/ftpfs.c') 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); -- cgit v1.2.3