git: 7f1012ff7c8b - main - pctrie: predict successful allocation

From: Ryan Libby <rlibby_at_FreeBSD.org>
Date: Mon, 03 Jun 2024 18:48:05 UTC
The branch main has been updated by rlibby:

URL: https://cgit.FreeBSD.org/src/commit/?id=7f1012ff7c8b8762c247698cb6f84963674d1f55

commit 7f1012ff7c8b8762c247698cb6f84963674d1f55
Author:     Ryan Libby <rlibby@FreeBSD.org>
AuthorDate: 2024-06-03 18:35:28 +0000
Commit:     Ryan Libby <rlibby@FreeBSD.org>
CommitDate: 2024-06-03 18:35:28 +0000

    pctrie: predict successful allocation
    
    Reviewed by:    dougm
    Sponsored by:   Dell EMC Isilon
    Differential Revision:  https://reviews.freebsd.org/D45407
---
 sys/sys/pctrie.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/pctrie.h b/sys/sys/pctrie.h
index eec74610587a..38b297899592 100644
--- a/sys/sys/pctrie.h
+++ b/sys/sys/pctrie.h
@@ -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);							\