Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/net Pull up following revision(s) (requested by msait...
details: https://anonhg.NetBSD.org/src/rev/ee39ce2ecfcb
branches: netbsd-7
changeset: 799209:ee39ce2ecfcb
user: snj <snj%NetBSD.org@localhost>
date: Thu Apr 16 06:08:34 2015 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #693):
sys/net/if.h: revision 1.186
Use 1000ULL to prevent integer overflow (for IF_Gbps(10)). Same as OpenBSD.
diffstat:
sys/net/if.h | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r 47b314a3cdae -r ee39ce2ecfcb sys/net/if.h
--- a/sys/net/if.h Tue Apr 14 13:17:47 2015 +0000
+++ b/sys/net/if.h Thu Apr 16 06:08:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.174 2014/07/31 06:35:47 ozaki-r Exp $ */
+/* $NetBSD: if.h,v 1.174.2.1 2015/04/16 06:08:34 snj Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -392,11 +392,10 @@
/*
* Some convenience macros used for setting ifi_baudrate.
- * XXX 1000 vs. 1024? --thorpej%NetBSD.org@localhost
*/
-#define IF_Kbps(x) ((x) * 1000) /* kilobits/sec. */
-#define IF_Mbps(x) (IF_Kbps((x) * 1000)) /* megabits/sec. */
-#define IF_Gbps(x) (IF_Mbps((x) * 1000)) /* gigabits/sec. */
+#define IF_Kbps(x) ((x) * 1000ULL) /* kilobits/sec. */
+#define IF_Mbps(x) (IF_Kbps((x) * 1000ULL)) /* megabits/sec. */
+#define IF_Gbps(x) (IF_Mbps((x) * 1000ULL)) /* gigabits/sec. */
/* Capabilities that interfaces can advertise. */
/* 0x01 .. 0x40 were previously used */
Home |
Main Index |
Thread Index |
Old Index