pctrie: predict successful allocation

Reviewed by:	dougm
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45407
This commit is contained in:
Ryan Libby 2024-06-03 11:35:28 -07:00
parent 3ca6bf7929
commit 7f1012ff7c

View file

@ -84,7 +84,7 @@ name##_PCTRIE_INSERT(struct pctrie *ptree, struct type *ptr) \
if (parentp == NULL) \
return (0); \
parent = allocfn(ptree); \
if (parent == NULL) \
if (__predict_false(parent == NULL)) \
return (ENOMEM); \
pctrie_insert_node(parentp, parent, val); \
return (0); \