summaryrefslogtreecommitdiffstats
path: root/Src/input.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2023-02-02 10:09:21 +0000
committerPeter Stephenson <p.stephenson@samsung.com>2023-02-02 10:09:21 +0000
commit21baad1037c1aa85384a81dd77a4661676336133 (patch)
tree1b7dfbabb4e5c5b17a347f5137d1bf11b07ab14c /Src/input.c
parent51342: update PARAMDEF description (diff)
downloadzsh-21baad1037c1aa85384a81dd77a4661676336133.tar
zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.gz
zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.bz2
zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.lz
zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.xz
zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.zst
zsh-21baad1037c1aa85384a81dd77a4661676336133.zip
51307: Improve error on attempt to define function from aliased name
Diffstat (limited to 'Src/input.c')
-rw-r--r--Src/input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/input.c b/Src/input.c
index 5a612669b..0da065e51 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -816,6 +816,7 @@ char *input_hasalias(void)
{
int flags = inbufflags;
struct instacks *instackptr = instacktop;
+ char *alias_nam = NULL;
for (;;)
{
@@ -824,9 +825,9 @@ char *input_hasalias(void)
DPUTS(instackptr == instack, "BUG: continuation at bottom of instack");
instackptr--;
if (instackptr->alias)
- return instackptr->alias->node.nam;
+ alias_nam = instackptr->alias->node.nam;
flags = instackptr->flags;
}
- return NULL;
+ return alias_nam;
}