summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-07-20 17:13:01 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:17 +0200
commit3bb46984fe4c76460a48cec338d210fe59a17807 (patch)
tree88884d540a809f03a1c7617a1300e336fffcead7
parent1fac2f5107e94102ca643ab9b031030bbcb1daa1 (diff)
2008-07-20 Samuel Thibault <samuel.thibault@ens-lyon.org>
* device/net_io.c (net_deliver): Fix parenthesis to really round up.
-rw-r--r--ChangeLog1
-rw-r--r--device/net_io.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 65bb49a..7b15bd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
to Debugger() call.
* kern/lock_mon.c (retry_simple_lock, retry_bit_lock): Likewise.
* kern/machine.c (Debugger): Remove declaration.
+ * device/net_io.c (net_deliver): Fix parenthesis to really round up.
2008-07-19 Barry deFreese <bddebian@comcast.net>
diff --git a/device/net_io.c b/device/net_io.c
index 5f287cb..dca99d7 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -508,8 +508,8 @@ boolean_t net_deliver(nonblocking)
MACH_MSGH_BITS(MACH_MSG_TYPE_PORT_SEND, 0);
/* remember message sizes must be rounded up */
kmsg->ikm_header.msgh_size =
- ((mach_msg_size_t) (sizeof(struct net_rcv_msg)
- - NET_RCV_MAX + count))+3 &~ 3;
+ (((mach_msg_size_t) (sizeof(struct net_rcv_msg)
+ - NET_RCV_MAX + count)) + 3) &~ 3;
kmsg->ikm_header.msgh_local_port = MACH_PORT_NULL;
kmsg->ikm_header.msgh_kind = MACH_MSGH_KIND_NORMAL;
kmsg->ikm_header.msgh_id = NET_RCV_MSG_ID;