summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstDupl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/lst.lib/lstDupl.c')
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c
index 364c526..2596816 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -84,14 +84,10 @@ Lst_Duplicate(Lst *list, DuplicateProc *copyProc)
ln = list->firstPtr;
while (ln != NULL) {
- if (copyProc != NOCOPY) {
- if (Lst_AtEnd(nl, (*copyProc)(ln->datum)) == FAILURE) {
- return (NULL);
- }
- } else if (Lst_AtEnd (nl, ln->datum) == FAILURE) {
- return (NULL);
- }
-
+ if (copyProc != NOCOPY)
+ Lst_AtEnd(nl, (*copyProc)(ln->datum));
+ else
+ Lst_AtEnd(nl, ln->datum);
ln = ln->nextPtr;
}
OpenPOWER on IntegriCloud