Skip to contentSkip to conversation

xfrm: fix boolean assignment in xfrm_get_type_offload

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jan 22, 2018 – Jan 24, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfrm: fix boolean assignment in xfrm_get_type_offload

Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Fixes ffdb5211da1c ("xfrm: Auto-load xfrm offload modules")
---
 net/xfrm/xfrm_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_state.c +1 -1
index 20b1e41..9f063c6 100644
@@ -317,7 +317,7 @@ xfrm_get_type_offload(u8 proto, unsigned short family, bool try_load)
 
 	if (!type && try_load) {
 		request_module("xfrm-offload-%d-%d", family, proto);
-		try_load = 0;
+		try_load = false;
 		goto retry;
 	}
 
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Fixes ffdb5211da1c ("xfrm: Auto-load xfrm offload modules")

Patch applied, thanks!