git: 2e0e27392732 - main - netinet6: trim overly long lines in GET_PKTOPT_VAR(), fit into 80 chars
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Oct 2022 18:38:58 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=2e0e27392732a811b52c002a707ac848bad01b30
commit 2e0e27392732a811b52c002a707ac848bad01b30
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-10-13 16:03:38 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-10-13 16:03:38 +0000
netinet6: trim overly long lines in GET_PKTOPT_VAR(), fit into 80 chars
---
sys/netinet6/ip6_output.c | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index f00f718445f5..99c22343dced 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -2571,33 +2571,33 @@ ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt,
return (ret);
}
-#define GET_PKTOPT_VAR(field, lenexpr) do { \
- if (pktopt && pktopt->field) { \
- INP_RUNLOCK(inp); \
- optdata = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK); \
- malloc_optdata = true; \
- INP_RLOCK(inp); \
- if (inp->inp_flags & INP_DROPPED) { \
- INP_RUNLOCK(inp); \
- free(optdata, M_TEMP); \
- return (ECONNRESET); \
- } \
- pktopt = inp->in6p_outputopts; \
- if (pktopt && pktopt->field) { \
- optdatalen = min(lenexpr, sopt->sopt_valsize); \
- bcopy(pktopt->field, optdata, optdatalen); \
- } else { \
- free(optdata, M_TEMP); \
- optdata = NULL; \
- malloc_optdata = false; \
- } \
- } \
+#define GET_PKTOPT_VAR(field, lenexpr) do { \
+ if (pktopt && pktopt->field) { \
+ INP_RUNLOCK(inp); \
+ optdata = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK); \
+ malloc_optdata = true; \
+ INP_RLOCK(inp); \
+ if (inp->inp_flags & INP_DROPPED) { \
+ INP_RUNLOCK(inp); \
+ free(optdata, M_TEMP); \
+ return (ECONNRESET); \
+ } \
+ pktopt = inp->in6p_outputopts; \
+ if (pktopt && pktopt->field) { \
+ optdatalen = min(lenexpr, sopt->sopt_valsize); \
+ bcopy(pktopt->field, optdata, optdatalen); \
+ } else { \
+ free(optdata, M_TEMP); \
+ optdata = NULL; \
+ malloc_optdata = false; \
+ } \
+ } \
} while(0)
-#define GET_PKTOPT_EXT_HDR(field) GET_PKTOPT_VAR(field, \
+#define GET_PKTOPT_EXT_HDR(field) GET_PKTOPT_VAR(field, \
(((struct ip6_ext *)pktopt->field)->ip6e_len + 1) << 3)
-#define GET_PKTOPT_SOCKADDR(field) GET_PKTOPT_VAR(field, \
+#define GET_PKTOPT_SOCKADDR(field) GET_PKTOPT_VAR(field, \
pktopt->field->sa_len)
static int