1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

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().
This commit is contained in:
Kalle Olavi Niemitalo 2009-07-21 01:09:37 +03:00 committed by Kalle Olavi Niemitalo
parent 71dfd47dcb
commit b80c0e8a0d

View File

@ -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;