Skip to content

Commit

Permalink
pctrie: predict successful allocation
Browse files Browse the repository at this point in the history
Reviewed by:	dougm
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45407
  • Loading branch information
rlibby committed Jun 3, 2024
1 parent 3ca6bf7 commit 7f1012f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/sys/pctrie.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit 7f1012f

Please sign in to comment.