Skip to contentSkip to conversation

assoc_array: clean up return in assoc_array_insert_mid_shortcut()

PATCH New Dan Carpenter 1 participant 1 message May 31, 2022

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

PATCH 1/1 assoc_array: clean up return in assoc_array_insert_mid_shortcut()

The assoc_array_insert_mid_shortcut() function returns type bool. It's cleaner to "return true;" instead of returning the edit pointer cast to bool.

---
 lib/assoc_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/assoc_array.c +1 -1
index 079c72e26493..552a4970a9d1 100644
@@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit,
 		edit->leaf_p = &new_n0->slots[0];
 
 	pr_devel("<--%s() = ok [split shortcut]\n", __func__);
-	return edit;
+	return true;
 }
 
 /**
Signature · 1 line
2.35.1