NetBSD Problem Report #53916

From www@NetBSD.org  Mon Jan 28 11:56:50 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F1FD17A1A3
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 28 Jan 2019 11:56:49 +0000 (UTC)
Message-Id: <20190128115649.2B1767A1F0@mollari.NetBSD.org>
Date: Mon, 28 Jan 2019 11:56:49 +0000 (UTC)
From: rrobgill@protonmail.com
Reply-To: rrobgill@protonmail.com
To: gnats-bugs@NetBSD.org
Subject: Variable 'matchlen' is set successively in usr.bin/ftp.c
X-Send-Pr-Version: www-1.0

>Number:         53916
>Category:       bin
>Synopsis:       Variable 'matchlen' is set successively in usr.bin/ftp.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 28 12:00:00 +0000 2019
>Closed-Date:    Mon Jan 28 12:08:11 +0000 2019
>Last-Modified:  Mon Jan 28 12:08:11 +0000 2019
>Originator:     Rob Gill
>Release:        n/a
>Organization:
>Environment:
n/a
>Description:
Variable matchlen is set on line 102, and again on line 104.

101 if (!list) {
102 	matchlen = 0;
103	lastmatch = words->sl_str[0];
104	matchlen = strlen(lastmatch);
105 for (i = 1 ; i < words->sl_cur ; i++) {


>How-To-Repeat:
n/a
>Fix:
delete line 102

102 	matchlen = 0;


>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53916 CVS commit: src/usr.bin/ftp
Date: Mon, 28 Jan 2019 07:04:16 -0500

 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.

State-Changed-From-To: open->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Mon, 28 Jan 2019 12:08:11 +0000
State-Changed-Why:
Patch committed by <christos>.
Thank you Rob for the PR and thanks to
Christos for committing it!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.