Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Dec 2009 08:52:06 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200020 - head/sys/netinet
Message-ID:  <200912020852.nB28q60m092493@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Wed Dec  2 08:52:06 2009
New Revision: 200020
URL: http://svn.freebsd.org/changeset/base/200020

Log:
  change the type of the opcode from enum *:8  to u_int8_t
  so the size and alignment of the ipfw_insn is not compiler dependent.
  No changes in the code generated by gcc.
  
  There was only one instance of this kind in our entire source tree,
  so i suspect the old definition was a poor choice (which i made).
  
  MFC after:	3 days

Modified:
  head/sys/netinet/ip_fw.h

Modified: head/sys/netinet/ip_fw.h
==============================================================================
--- head/sys/netinet/ip_fw.h	Wed Dec  2 07:51:25 2009	(r200019)
+++ head/sys/netinet/ip_fw.h	Wed Dec  2 08:52:06 2009	(r200020)
@@ -237,7 +237,7 @@ enum ipfw_opcodes {		/* arguments (4 byt
  *
  */
 typedef struct	_ipfw_insn {	/* template for instructions */
-	enum ipfw_opcodes	opcode:8;
+	u_int8_t 	opcode;
 	u_int8_t	len;	/* number of 32-bit words */
 #define	F_NOT		0x80
 #define	F_OR		0x40



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912020852.nB28q60m092493>