Author: gnn
Date: Fri Nov 15 16:03:32 2013
New Revision: 258175
URL: http://svnweb.freebsd.org/changeset/base/258175

Log:
  Clean up the macros to avoid using casts.
  
  Suggested by: bde and jhb

Modified:
  head/sys/net/ieee_oui.h

Modified: head/sys/net/ieee_oui.h
==============================================================================
--- head/sys/net/ieee_oui.h     Fri Nov 15 15:29:53 2013        (r258174)
+++ head/sys/net/ieee_oui.h     Fri Nov 15 16:03:32 2013        (r258175)
@@ -32,7 +32,8 @@
  */
 
 /* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */
-#define OUI_FREEBSD 0x589cfc
+#define OUI_FREEBSD_BASE 0x589cfc000000
+#define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic))
 
 /* 
  * OUIs are most often used to uniquely identify network interfaces
@@ -62,5 +63,5 @@
  */
 
 /* Allocate 64K to bhyve */
-#define OUI_FREEBSD_BHYVE_LOW  (((uint64_t)OUI_FREEBSD << 24) | 0x000001)
-#define OUI_FREEBSD_BHYVE_HIGH (((uint64_t)OUI_FREEBSD << 24) | 0x00ffff)
+#define OUI_FREEBSD_BHYVE_LOW  OUI_FREEBSD(0x000001)
+#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD(0x00ffff)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to