Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumphijack Don't count sparse elements in the poll ve...
details: https://anonhg.NetBSD.org/src/rev/9829ce5af2e7
branches: trunk
changeset: 760998:9829ce5af2e7
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jan 18 14:51:14 2011 +0000
description:
Don't count sparse elements in the poll vector for host fds.
diffstat:
lib/librumphijack/hijack.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 55534d86720a -r 9829ce5af2e7 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Tue Jan 18 14:45:30 2011 +0000
+++ b/lib/librumphijack/hijack.c Tue Jan 18 14:51:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.11 2011/01/18 14:45:30 pooka Exp $ */
+/* $NetBSD: hijack.c,v 1.12 2011/01/18 14:51:14 pooka Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.11 2011/01/18 14:45:30 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.12 2011/01/18 14:51:14 pooka Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -772,6 +772,9 @@
nfds_t i;
for (i = 0; i < nfds; i++) {
+ if (fds[i].fd == -1)
+ continue;
+
if (fd_isrump(fds[i].fd))
(*rumpcall)++;
else
Home |
Main Index |
Thread Index |
Old Index