Date: Wed, 1 Jul 2009 01:45:53 +0400 From: Stanislav Sedov <stas@FreeBSD.org> To: Martin Blapp <mbr@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marc Balmer <marc@msys.ch> Subject: Re: svn commit: r195200 - in head/usr.sbin: . wake Message-ID: <20090701014553.32117b64.stas@FreeBSD.org> In-Reply-To: <200906301851.n5UIpNJQ089171@svn.freebsd.org> References: <200906301851.n5UIpNJQ089171@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <mbr@FreeBSD.org> 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 <bsd.prog.mk> > 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090701014553.32117b64.stas>