mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.5 IrDA] struct check
@ 2003-07-09 23:49 Jean Tourrilhes
  0 siblings, 0 replies; only message in thread
From: Jean Tourrilhes @ 2003-07-09 23:49 UTC (permalink / raw)
  To: Jeff Garzik, Linux kernel mailing list

ir250_struct_check.diff :
~~~~~~~~~~~~~~~~~~~~~~~
		<Suggested by Russell King>
	o [FEATURE] Add struct size check for buggy compilers


diff -u -p linux/net/irda/irlap.d2.c linux/net/irda/irlap.c
--- linux/net/irda/irlap.d2.c	Wed Jun  4 15:17:05 2003
+++ linux/net/irda/irlap.c	Wed Jun  4 15:21:29 2003
@@ -79,6 +79,13 @@ int irlap_proc_read(char *, char **, off
 
 int __init irlap_init(void)
 {
+	/* Check if the compiler did its job properly.
+	 * May happen on some ARM configuration, check with Russell King. */
+	ASSERT(sizeof(struct xid_frame) == 14, ;);
+	ASSERT(sizeof(struct test_frame) == 10, ;);
+	ASSERT(sizeof(struct ua_frame) == 10, ;);
+	ASSERT(sizeof(struct snrm_frame) == 11, ;);
+
 	/* Allocate master array */
 	irlap = hashbin_new(HB_LOCK);
 	if (irlap == NULL) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-10  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-09 23:49 [PATCH 2.5 IrDA] struct check Jean Tourrilhes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®