From owner-freebsd-current@FreeBSD.ORG Mon Jun 22 04:25:06 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FFF6106566C; Mon, 22 Jun 2009 04:25:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-px0-f203.google.com (mail-px0-f203.google.com [209.85.216.203]) by mx1.freebsd.org (Postfix) with ESMTP id 6CDA68FC17; Mon, 22 Jun 2009 04:25:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-px0-f203.google.com with SMTP id 41so2322896pxi.3 for ; Sun, 21 Jun 2009 21:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=HP2Zkmcqd/MNh5eIkuYYnUvP1eFfR5cUo0/4oZnPDto=; b=jKrzxBwL0v7PKHlxruwsQU6x7F5SJ+1YNW1iFFgHMgKUf9tBVKjWBwljZPCeII1nL+ rTITCgtubiPbY0A9A84bD8nuTonUXsvzoQHQIR/X5n2AQ+P/A/x7epcXfjYouE+RbWSq PAe6lf7zyZ8OWi/zFfpZkEHYJInJ/UP0thv6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NvJaLg8L55bQkpN+F2RggGasZm56zyQRHwaUP6LlR+RQNCiz3zfS0kECvfhwybiAca FwTS0uAChyl92F+P/2D4kUetwb0Aqo0wRDo5SMaDTejRFKyNeXqn67QRi5AraTMSpkuD 3HWQGq15bCwSvayPrmbSs4AFvYynJXQBuj/bA= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.141.19.9 with SMTP id w9mr4855685rvi.118.1245643489913; Sun, 21 Jun 2009 21:04:49 -0700 (PDT) In-Reply-To: <20090621082022.GA88526@freebsd.org> References: <20090621082022.GA88526@freebsd.org> Date: Mon, 22 Jun 2009 12:04:49 +0800 X-Google-Sender-Auth: 93f9e7282d9afd6d Message-ID: From: Adrian Chadd To: Roman Divacky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: current@freebsd.org Subject: Re: [PATCH]: if (cond); foo() in firewire X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 04:25:06 -0000 2009/6/21 Roman Divacky : > hi > > is this patch correct? may I commit it? > > Index: ../../../dev/firewire/fwdev.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- ../../../dev/firewire/fwdev.c =A0 =A0 =A0 (revision 194573) > +++ ../../../dev/firewire/fwdev.c =A0 =A0 =A0 (working copy) > @@ -443,7 +443,7 @@ > =A0 =A0 =A0 =A0xfer->send.pay_len =3D uio->uio_resid; > =A0 =A0 =A0 =A0if (uio->uio_resid > 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((err =3D uiomove((caddr_t)&xfer->send.= payload[0], > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uio->uio_resid, uio))); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uio->uio_resid, uio))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out; > =A0 =A0 =A0 =A0} > > > another bug found by the "useless warnings in clang" ;) Is clang also evaluating all subsequent execution paths to tell you what the change in program flow is? :) I hate to be the harbinger of evilness, but I'd at least attempt a cursory glance at the code to make sure subsequent code is doing the right thing. (It certainly looks like a vanilla userland transfer!) 2c, Adrian