Module Name:    src
Committed By:   mbalmer
Date:           Wed Jul  1 07:49:12 UTC 2009

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

Log Message:
Fix write loop.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/wake/wake.c

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

Modified files:

Index: src/usr.sbin/wake/wake.c
diff -u src/usr.sbin/wake/wake.c:1.6 src/usr.sbin/wake/wake.c:1.7
--- src/usr.sbin/wake/wake.c:1.6	Fri Jun 26 21:55:28 2009
+++ src/usr.sbin/wake/wake.c	Wed Jul  1 07:49:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: wake.c,v 1.6 2009/06/26 21:55:28 mbalmer Exp $ */
+/* $NetBSD: wake.c,v 1.7 2009/07/01 07:49:12 mbalmer Exp $ */
 
 /*
  * Copyright (C) 2006, 2007, 2008, 2009 Marc Balmer <[email protected]>
@@ -143,7 +143,7 @@
 	len = sizeof(pkt);
 	bw = 0;
 	while (len) {
-		if ((bw = write(bpf, &pkt, sizeof(pkt))) == -1)
+		if ((bw = write(bpf, p, len)) == -1)
 			return -1;
 		len -= bw;
 		p += bw;

Reply via email to