On Tue, 30 Jun 2009 18:51:23 +0000 (UTC) Martin Blapp <m...@freebsd.org> mentioned:
> Author: mbr > Date: Tue Jun 30 18:51:22 2009 > New Revision: 195200 > URL: http://svn.freebsd.org/changeset/base/195200 > > Log: > Add wake, a tool to send Wake on LAN frames to hosts on a local Ethernet > network > Cool! I always wanted something like this in base. > + > +WARNS?= 2 > + > +.include <bsd.prog.mk> > What is the reason to use WARNS=2 here? Does it compile with higher warning flags set? Could this warnings be fixed? > + p = (u_char *)&pkt; > + len = sizeof(pkt); > + bw = 0; > + while (len) { > + if ((bw = write(bpf, &pkt, sizeof(pkt))) == -1) > + return -1; > + len -= bw; > + p += 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! -- Stanislav Sedov ST4096-RIPE
pgpDxK4jwOiP2.pgp
Description: PGP signature