summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2004-07-08 21:28:07 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2004-07-08 21:28:07 +0000
commitb6103358db477798382c0a638a76d0ca6427ab99 (patch)
treedfcc8f53ba8810b8f38c7f3f581e476b5f2864c4
parentda91615caa3ed4bf8c049781764120446f0dd2ed (diff)
misplaced return NULL in the error path
found by lint via deraadt ok deraadt
-rw-r--r--usr.bin/mg/echo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/echo.c b/usr.bin/mg/echo.c
index 6bd94fe1b10..fc28bb9ff2b 100644
--- a/usr.bin/mg/echo.c
+++ b/usr.bin/mg/echo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: echo.c,v 1.27 2004/01/21 00:46:38 vincent Exp $ */
+/* $OpenBSD: echo.c,v 1.28 2004/07/08 21:28:06 vincent Exp $ */
/*
* Echo line reading and writing.
@@ -758,12 +758,12 @@ copy_list(LIST *lp)
for (current = last; current; current = nxt) {
nxt = current->l_next;
free(current);
- return (NULL);
}
+ return (NULL);
}
current->l_next = last;
current->l_name = lp->l_name;
- last = (LIST *)current;
+ last = current;
lp = lp->l_next;
}
return (last);