From ad9a9bec99b236e9ee106c78bd98a6f2f3f5a2e2 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 15 Oct 2025 20:15:51 +0000 Subject: [PATCH] socket: Annotate sooptcopyin() and sooptcopyout() with __result_use_check Just like we do with copyin() and copyout(). Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D53114 (cherry picked from commit 3509dcd11a982107d957b99f6740704e9c522bd8) --- sys/sys/sockopt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/sockopt.h b/sys/sys/sockopt.h index bfe12d8510d..d2b0ff5ed2c 100644 --- a/sys/sys/sockopt.h +++ b/sys/sys/sockopt.h @@ -57,8 +57,10 @@ struct sockopt { int sosetopt(struct socket *so, struct sockopt *sopt); int sogetopt(struct socket *so, struct sockopt *sopt); -int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen); -int sooptcopyout(struct sockopt *sopt, const void *buf, size_t len); +int __result_use_check sooptcopyin(struct sockopt *sopt, void *buf, size_t len, + size_t minlen); +int __result_use_check sooptcopyout(struct sockopt *sopt, const void *buf, + size_t len); int soopt_getm(struct sockopt *sopt, struct mbuf **mp); int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m);