PR/53916: Rob Gill: remove redundant assignment to matchlen.
This commit is contained in:
parent
6476864fc5
commit
44671790a5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: complete.c,v 1.46 2009/04/12 10:18:52 lukem Exp $ */
|
||||
/* $NetBSD: complete.c,v 1.47 2019/01/28 12:04:16 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: complete.c,v 1.46 2009/04/12 10:18:52 lukem Exp $");
|
||||
__RCSID("$NetBSD: complete.c,v 1.47 2019/01/28 12:04:16 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -99,11 +99,10 @@ complete_ambiguous(char *word, int list, StringList *words)
|
||||
}
|
||||
|
||||
if (!list) {
|
||||
matchlen = 0;
|
||||
lastmatch = words->sl_str[0];
|
||||
matchlen = strlen(lastmatch);
|
||||
for (i = 1 ; i < words->sl_cur ; i++) {
|
||||
for (j = wordlen ; j < strlen(words->sl_str[i]); j++)
|
||||
for (j = wordlen; j < strlen(words->sl_str[i]); j++)
|
||||
if (lastmatch[j] != words->sl_str[i][j])
|
||||
break;
|
||||
if (j < matchlen)
|
||||
|
Loading…
Reference in New Issue
Block a user