From b80c0e8a0d9f7aca210e1e0c164f3193a99fcde9 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Tue, 21 Jul 2009 01:09:37 +0300 Subject: [PATCH] lookup_unique_name: Remove always true condition Remove the stracpy(ofile) call that could never be executed. This removes the need to handle errors from that call, and makes it clear that lun_hop->file need not be separately freed if an error occurs in lookup_unique_name(). --- src/session/download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/session/download.c b/src/session/download.c index 89f522c9..30908edc 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -716,7 +716,7 @@ lookup_unique_name(struct terminal *term, unsigned char *ofile, if (!lun_hop) goto error; lun_hop->term = term; lun_hop->ofile = ofile; - lun_hop->file = (file != ofile) ? file : stracpy(ofile); + lun_hop->file = file; /* file != ofile verified above */ lun_hop->callback = callback; lun_hop->data = data; lun_hop->resume = resume; -- 2.11.4.GIT