Module Name:    src
Committed By:   christos
Date:           Mon Jan 28 12:04:16 UTC 2019

Modified Files:
        src/usr.bin/ftp: complete.c

Log Message:
PR/53916: Rob Gill: remove redundant assignment to matchlen.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/ftp/complete.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/complete.c
diff -u src/usr.bin/ftp/complete.c:1.46 src/usr.bin/ftp/complete.c:1.47
--- src/usr.bin/ftp/complete.c:1.46	Sun Apr 12 06:18:52 2009
+++ src/usr.bin/ftp/complete.c	Mon Jan 28 07:04:16 2019
@@ -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,
 	}
 
 	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)

Reply via email to