svn commit: r245545 - projects/diffused_head/sys/netinet
Lawrence Stewart
lstewart at FreeBSD.org
Thu Jan 17 08:55:57 UTC 2013
Author: lstewart
Date: Thu Jan 17 08:55:56 2013
New Revision: 245545
URL: http://svnweb.freebsd.org/changeset/base/245545
Log:
Mark some structs which are used for wire protocol parsing as __packed to ensure
the compiler does the right thing to avoid unaligned accesses.
Reported by: clang
Modified:
projects/diffused_head/sys/netinet/ip_diffuse_export.h
Modified: projects/diffused_head/sys/netinet/ip_diffuse_export.h
==============================================================================
--- projects/diffused_head/sys/netinet/ip_diffuse_export.h Thu Jan 17 08:51:02 2013 (r245544)
+++ projects/diffused_head/sys/netinet/ip_diffuse_export.h Thu Jan 17 08:55:56 2013 (r245545)
@@ -110,17 +110,17 @@ struct dip_header {
uint16_t msg_len;
uint32_t seq_no;
uint32_t time;
-};
+} __packed;
struct dip_set_header {
uint16_t set_id;
uint16_t set_len;
-};
+} __packed;
struct dip_templ_header {
uint16_t templ_id;
uint16_t flags;
-};
+} __packed;
#if defined(WITH_DIP_INFO)
static struct dip_info_descr dip_info[] = {
More information about the svn-src-projects
mailing list