summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 99ec03e0c2..c165305d78 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -608,11 +608,14 @@ static struct cmd_token *disambiguate_tokens(struct cmd_token *first,
static struct list *disambiguate(struct list *first, struct list *second,
vector vline, unsigned int n)
{
+ assert(first != NULL);
+ assert(second != NULL);
// doesn't make sense for these to be inequal length
assert(first->count == second->count);
assert(first->count == vector_active(vline) - n + 1);
- struct listnode *fnode = listhead(first), *snode = listhead(second);
+ struct listnode *fnode = listhead_unchecked(first),
+ *snode = listhead_unchecked(second);
struct cmd_token *ftok = listgetdata(fnode), *stok = listgetdata(snode),
*best = NULL;