summaryrefslogtreecommitdiffstats
path: root/source/client/client.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-06-11 06:23:53 +0000
committerAndrew Tridgell <tridge@samba.org>2003-06-11 06:23:53 +0000
commit294f79884df1ebc4a8d955601e7547bdcadef5d6 (patch)
tree9b863ec45d9d0692009ac21bb2e3433527a25686 /source/client/client.c
parent21931ad7a0584c14fd0278adc74eab9cacf14a3d (diff)
downloadsamba-294f79884df1ebc4a8d955601e7547bdcadef5d6.tar.gz
samba-294f79884df1ebc4a8d955601e7547bdcadef5d6.tar.xz
samba-294f79884df1ebc4a8d955601e7547bdcadef5d6.zip
several places in client.c rely in commands[i].name == NULL being a
termination condition for checking for commands. Make sure the last element is indeed NULL.
Diffstat (limited to 'source/client/client.c')
-rw-r--r--source/client/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/client/client.c b/source/client/client.c
index bfa587d11a1..f2be268efe2 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -2108,7 +2108,7 @@ static struct
/* Yes, this must be here, see crh's comment above. */
{"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
- {"",NULL,NULL,{COMPL_NONE,COMPL_NONE}}
+ {NULL,NULL,NULL,{COMPL_NONE,COMPL_NONE}}
};
@@ -2328,7 +2328,7 @@ static char **completion_fn(const char *text, int start, int end)
if (sp == NULL)
return NULL;
- for (i = 0; commands[i].description; i++)
+ for (i = 0; commands[i].name; i++)
if ((strncmp(commands[i].name, text, sp - buf) == 0) && (commands[i].name[sp - buf] == 0))
break;
if (commands[i].name == NULL)