summaryrefslogtreecommitdiff
path: root/source3
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
commit1d03ec88f13adb22dfb12efc73c410fca032547b (patch)
treeaa06dd0c2b0f3f6774aac2d291954c2c1fa8ff04 /source3
parent98f448b1f43e3edc5687bd373e07b1d022541090 (diff)
downloadsamba-1d03ec88f13adb22dfb12efc73c410fca032547b.tar.gz
samba-1d03ec88f13adb22dfb12efc73c410fca032547b.tar.bz2
samba-1d03ec88f13adb22dfb12efc73c410fca032547b.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. (This used to be commit 294f79884df1ebc4a8d955601e7547bdcadef5d6)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index bfa587d11a..f2be268efe 100644
--- a/source3/client/client.c
+++ b/source3/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)