mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
pctrie: predict successful allocation
Reviewed by: dougm Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45407
This commit is contained in:
parent
3ca6bf7929
commit
7f1012ff7c
|
@ -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); \
|
||||
|
|
Loading…
Reference in a new issue