Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net if_llc.h: Replace __packed with CTASSERT



details:   https://anonhg.NetBSD.org/src/rev/1590792b62cd
branches:  trunk
changeset: 980400:1590792b62cd
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Feb 03 12:11:34 2021 +0000

description:
if_llc.h: Replace __packed with CTASSERT

diffstat:

 sys/net/if_llc.h |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r a51bd67996fd -r 1590792b62cd sys/net/if_llc.h
--- a/sys/net/if_llc.h  Wed Feb 03 11:53:43 2021 +0000
+++ b/sys/net/if_llc.h  Wed Feb 03 12:11:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_llc.h,v 1.21 2014/09/05 05:32:07 matt Exp $ */
+/*     $NetBSD: if_llc.h,v 1.22 2021/02/03 12:11:34 roy Exp $  */
 
 /*
  * Copyright (c) 1988, 1993
@@ -82,7 +82,7 @@
                uint8_t control_ext;
            } type_raw /* XXX __packed ??? */;
        } llc_un /* XXX __packed ??? */;
-} __packed;
+};
 
 struct frmrinfo {
        uint8_t frmr_rej_pdu0;
@@ -90,7 +90,12 @@
        uint8_t frmr_control;
        uint8_t frmr_control_ext;
        uint8_t frmr_cause;
-} __packed;
+};
+
+#ifdef CTASSERT
+CTASSERT(sizeof(struct llc) == 8);
+CTASSERT(sizeof(struct frmrinfo) == 5);
+#endif
 
 #define        llc_control             llc_un.type_u.control
 #define        llc_control_ext         llc_un.type_raw.control_ext



Home | Main Index | Thread Index | Old Index