NetBSD Problem Report #50821

From www@NetBSD.org  Wed Feb 17 11:23:08 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9C2677A0F0
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Feb 2016 11:23:08 +0000 (UTC)
Message-Id: <20160217112307.BBA2C7ACD0@mollari.NetBSD.org>
Date: Wed, 17 Feb 2016 11:23:07 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/usr.sbin/traceroute/traceroute.c:1247: strange expression ?
X-Send-Pr-Version: www-1.0

>Number:         50821
>Category:       bin
>Synopsis:       src/usr.sbin/traceroute/traceroute.c:1247: strange expression ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 17 11:25:00 +0000 2016
>Closed-Date:    Wed Feb 17 19:57:43 +0000 2016
>Last-Modified:  Wed Feb 17 20:00:01 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160216
>Organization:
>Environment:
>Description:
[src/usr.sbin/traceroute/traceroute.c:1247]: (style) Same expression on both sides of '<'.


Source code is


     for (p = useicmp ? (u_char *)outicmp : (u_char *)outudp, i = 0; i <
        i < packlen - (sizeof(*outip) + optlen); i++)

Maybe better code might be

   for (p = useicmp ? (u_char *)outicmp : (u_char *)outudp, i = 0; 
        i < packlen - (sizeof(*outip) + optlen); i++)




>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 17 Feb 2016 19:57:43 +0000
State-Changed-Why:
Fixed by christos.


From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50821 CVS commit: src/usr.sbin/traceroute
Date: Wed, 17 Feb 2016 14:57:01 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Wed Feb 17 19:57:01 UTC 2016

 Modified Files:
 	src/usr.sbin/traceroute: traceroute.c

 Log Message:
 PR/50821: David Binderman: remove "i <" i <


 To generate a diff of this commit:
 cvs rdiff -u -r1.82 -r1.83 src/usr.sbin/traceroute/traceroute.c

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.