From owner-svn-src-all@FreeBSD.ORG Tue Jun 30 21:45:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 964AB106564A; Tue, 30 Jun 2009 21:45:36 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 454F48FC23; Tue, 30 Jun 2009 21:45:36 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from orion.SpringDaemons.com (unknown [77.232.3.143]) by mx0.deglitch.com (Postfix) with ESMTPA id 6775E8FC27; Wed, 1 Jul 2009 01:45:35 +0400 (MSD) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id A30C239C4F; Wed, 1 Jul 2009 01:45:53 +0400 (MSD) Date: Wed, 1 Jul 2009 01:45:53 +0400 From: Stanislav Sedov To: Martin Blapp Message-Id: <20090701014553.32117b64.stas@FreeBSD.org> In-Reply-To: <200906301851.n5UIpNJQ089171@svn.freebsd.org> References: <200906301851.n5UIpNJQ089171@svn.freebsd.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__1_Jul_2009_01_45_53_+0400_zaFcz2MWLEue5GCo" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marc Balmer Subject: Re: svn commit: r195200 - in head/usr.sbin: . wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 21:45:37 -0000 --Signature=_Wed__1_Jul_2009_01_45_53_+0400_zaFcz2MWLEue5GCo Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 30 Jun 2009 18:51:23 +0000 (UTC) Martin Blapp mentioned: > Author: mbr > Date: Tue Jun 30 18:51:22 2009 > New Revision: 195200 > URL: http://svn.freebsd.org/changeset/base/195200 >=20 > Log: > Add wake, a tool to send Wake on LAN frames to hosts on a local Etherne= t network > =20 Cool! I always wanted something like this in base. > + > +WARNS?=3D 2 > + > +.include > What is the reason to use WARNS=3D2 here? Does it compile with higher warn= ing flags set? Could this warnings be fixed? =20 > + p =3D (u_char *)&pkt; > + len =3D sizeof(pkt); > + bw =3D 0; > + while (len) { > + if ((bw =3D write(bpf, &pkt, sizeof(pkt))) =3D=3D -1) > + return -1; > + len -=3D bw; > + p +=3D bw; > + } > + return 0; > +} What the "p" pointer is used here for? I don't see any usage for it besides incrementing it in the loop. Am I missing something? Thanks! --=20 Stanislav Sedov ST4096-RIPE --Signature=_Wed__1_Jul_2009_01_45_53_+0400_zaFcz2MWLEue5GCo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJKSoeRAAoJEKN82nOYvCd0MqkQALXjZTxP30FY17HVeYCaZaTn sasGPqmKNSQGCv1tOMI1sZDB6P8lxLroEIL6PR/ZTszmYF85+PAAuPUv3EJqDL7/ Jp/gO6hTv+1ygRhxCotKAzpDmaa8QBKHUiDiOBeEc8UjeBhi7v36K29YENez2qf+ SJxHXApAAiyHuivs9HkPiw/BPm8ooycV/T1EdTcqzzaynAc491wNFGOE0lTTdb7+ WJQgrb35Ci8YESGmQcY9/Me3y+gLbcj5J95CgCKPh/X1JIpjD+Ar/vQbYK7R2Ds3 lxNS3euwU+4hYKgRfzDYGAbfF08Jyz4Zr4G8xujV2ZQNiQK3xu5H5oyD1GShcUWw qQRxyo/69jkakXfmpNqN56h8SIuymtcSC/OdaFWf3ZsVbab2uw3X8B2wIQzMm9W4 0+po9pEyaz+kHGj+ktQD52aUaOhem5BJkHwwKgxO4JdeDZf+1SNbT0/n9qoV+4BD BXsKvWtKErWE7OT2FSsNJ6Rqge2OHvXshVxM3PLbvssJ2oSFt/8pM6DSgirBLukg edqGNPNLblCQcelusnZiF8TeP1pir6SygBzuafh2TnqBJGJQ1uAv/nK2/Eae3Zuk f/R83zKF1TV6xzS68tnR4u/J14zgRdASWo7D23zL+/t5NBkz4ENbSopFaS4nZw8I Y6P/AfNNIczrvCIU/5Do =Tu+f -----END PGP SIGNATURE----- --Signature=_Wed__1_Jul_2009_01_45_53_+0400_zaFcz2MWLEue5GCo--