include/uapi/linux/netfilter/xt_sctp.h: use _Bool type, 1 for true and 0 for false

Started by Mikko Rapeli on May 30, 2015

Subsystems (2)

Maintainers (3)

DORMANTno replies SUPERSEDED

Status: Superseded by v4 (posted 2015-10-15). [go to v4]

Revision v03 (2 revisions archived).

Revisions (2)
  1. v03 current
  2. v4 [diff against previous] re-posted go to this post

open the first message on its own page

Message details and related content
Fixes userspace compilation errors like:

error: unknown type name ‘bool’
 static __inline__ bool
error: ‘false’ undeclared (first use in this function)
    return false;

Signed-off-by: Mikko Rapeli <redacted>
---
 include/uapi/linux/netfilter/xt_sctp.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/uapi/linux/netfilter/xt_sctp.h b/include/uapi/linux/netfilter/xt_sctp.h
index 29287be..58ffcfb 100644
--- a/include/uapi/linux/netfilter/xt_sctp.h
+++ b/include/uapi/linux/netfilter/xt_sctp.h
@@ -66,26 +66,26 @@ struct xt_sctp_info {
 
 #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
 	__sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap))
-static inline bool
+static inline _Bool
 __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n)
 {
 	unsigned int i;
 	for (i = 0; i < n; ++i)
 		if (chunkmap[i])
-			return false;
-	return true;
+			return 0;
+	return 1;
 }
 
 #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
 	__sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))
-static inline bool
+static inline _Bool
 __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n)
 {
 	unsigned int i;
 	for (i = 0; i < n; ++i)
 		if (chunkmap[i] != ~0U)
-			return false;
-	return true;
+			return 0;
+	return 1;
 }
 
 #endif /* _XT_SCTP_H_ */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help