Skip to contentSkip to conversation

fix misspelling in the example of container_of

PATCH Applied Yubin Ruan 2 participants 2 messages Mar 12, 2018 – Mar 14, 2018

lore
Share & tools
lore

Yubin Ruan

author
#0 lore raw

PATCH 1/1 fix misspelling in the example of container_of

From 47c92fe951545e780ca31c598bbcbe5347059b27 Mon Sep 17 00:00:00 2001
From: Yubin Ruan <[email protected]>
Date: Mon, 12 Mar 2018 11:22:35 +0800
Subject: [PATCH] fix misspelling in the example of container_of

---
 ccan/check_type/check_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ccan/check_type/check_type.h +1 -1
index 77501a9..837aef7 100644
@@ -43,7 +43,7 @@
  *	#define container_of(mbr_ptr, encl_type, mbr)			\
  *		(check_types_match((mbr_ptr), &((encl_type *)0)->mbr),	\
  *		 ((encl_type *)						\
- *		  ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
+ *		  ((char *)(mbr_ptr) - offsetof(encl_type, mbr))))
  */
 #if HAVE_TYPEOF
 #define check_type(expr, type)			\
Signature · 6 lines
2.7.4

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
Applied
#1 lore raw
Quoted 6 lines · Yubin Ruan

From 47c92fe951545e780ca31c598bbcbe5347059b27 Mon Sep 17 00:00:00 2001
From: Yubin Ruan <[email protected]>
Date: Mon, 12 Mar 2018 11:22:35 +0800
Subject: [PATCH] fix misspelling in the example of container_of

Applied, thanks.

Quoted 17 lines
---
 ccan/check_type/check_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ccan/check_type/check_type.h +1 -1
index 77501a9..837aef7 100644
@@ -43,7 +43,7 @@
  *	#define container_of(mbr_ptr, encl_type, mbr)			\
  *		(check_types_match((mbr_ptr), &((encl_type *)0)->mbr),	\
  *		 ((encl_type *)						\
- *		  ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
+ *		  ((char *)(mbr_ptr) - offsetof(encl_type, mbr))))
  */
 #if HAVE_TYPEOF
 #define check_type(expr, type)			\
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan