Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumphijack make compiler sign-happy
details: https://anonhg.NetBSD.org/src/rev/ee84ed0dcf1e
branches: trunk
changeset: 762786:ee84ed0dcf1e
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Feb 28 20:39:07 2011 +0000
description:
make compiler sign-happy
diffstat:
lib/librumphijack/hijack.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 0ac88833bf11 -r ee84ed0dcf1e lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c Mon Feb 28 19:57:36 2011 +0000
+++ b/lib/librumphijack/hijack.c Mon Feb 28 20:39:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hijack.c,v 1.71 2011/02/28 19:57:36 pooka Exp $ */
+/* $NetBSD: hijack.c,v 1.72 2011/02/28 20:39:07 pooka Exp $ */
/*-
* Copyright (c) 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.71 2011/02/28 19:57:36 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.72 2011/02/28 20:39:07 pooka Exp $");
#define __ssp_weak_name(fun) _hijack_ ## fun
@@ -271,7 +271,8 @@
int i;
for (i = 0; i <= DUP2HIGH; i++) {
- if (dup2vec[i] & DUP2BIT && (dup2vec[i] & DUP2FDMASK) == rumpfd)
+ if (dup2vec[i] & DUP2BIT &&
+ (dup2vec[i] & DUP2FDMASK) == (unsigned)rumpfd)
return i;
}
return -1;
@@ -1002,8 +1003,12 @@
*/
for (i = 0, maxdup2 = 0; i <= DUP2HIGH; i++) {
- if (dup2vec[i] & DUP2BIT)
- maxdup2 = MAX(dup2vec[i] & DUP2FDMASK, maxdup2);
+ if (dup2vec[i] & DUP2BIT) {
+ int val;
+
+ val = dup2vec[i] & DUP2FDMASK;
+ maxdup2 = MAX(val, maxdup2);
+ }
}
if (fd >= HIJACK_FDOFF)
Home |
Main Index |
Thread Index |
Old Index