summary refs log tree commit diff
path: root/src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.c b/src/exec.c
index 194088b..a13ad67 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -690,14 +690,14 @@ addcmdentry(char *name, struct cmdentry *entry)
  */
 
 void
-defun(char *name, union node *func)
+defun(union node *func)
 {
 	struct cmdentry entry;
 
 	INTOFF;
 	entry.cmdtype = CMDFUNCTION;
 	entry.u.func = copyfunc(func);
-	addcmdentry(name, &entry);
+	addcmdentry(func->narg.text, &entry);
 	INTON;
 }