Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys sbspace(): use lmin() instead of imin() and kill now...
details: https://anonhg.NetBSD.org/src/rev/5d95ca013d6a
branches: trunk
changeset: 515562:5d95ca013d6a
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Sep 28 18:02:45 2001 +0000
description:
sbspace(): use lmin() instead of imin() and kill now unneeded casts
Pointed out by Scott Barron in kern/13687.
diffstat:
sys/sys/socketvar.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r 91319f84d71d -r 5d95ca013d6a sys/sys/socketvar.h
--- a/sys/sys/socketvar.h Fri Sep 28 16:23:19 2001 +0000
+++ b/sys/sys/socketvar.h Fri Sep 28 18:02:45 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socketvar.h,v 1.49 2001/07/01 20:42:48 matt Exp $ */
+/* $NetBSD: socketvar.h,v 1.50 2001/09/28 18:02:45 jdolecek Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@@ -160,11 +160,10 @@
* How much space is there in a socket buffer (so->so_snd or so->so_rcv)?
* This is problematical if the fields are unsigned, as the space might
* still be negative (cc > hiwat or mbcnt > mbmax). Should detect
- * overflow and return 0. Should use "lmin" but it doesn't exist now.
+ * overflow and return 0.
*/
#define sbspace(sb) \
- ((long) imin((int)((sb)->sb_hiwat - (sb)->sb_cc), \
- (int)((sb)->sb_mbmax - (sb)->sb_mbcnt)))
+ (lmin((sb)->sb_hiwat - (sb)->sb_cc, (sb)->sb_mbmax - (sb)->sb_mbcnt))
/* do we have to send all at once on a socket? */
#define sosendallatonce(so) \
Home |
Main Index |
Thread Index |
Old Index