From nobody Sun Oct 06 11:38:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XM0dm6h4lz5XjDd; Sun, 06 Oct 2024 11:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XM0dm5yYlz4xgH; Sun, 6 Oct 2024 11:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728214684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Vhur1vhExO/zCJvR0PMdRXrccenZ8RmzlNnlZz8EO0=; b=YhD4RhJFLUY1hP73CjlkKUbHHrwrmUvguwxToDvYmWQZ3AegADUMIoVJoDHi1etOSqtEyD a+KX+K1CUHnVBdz6EWwkELZe6EoYiLT01vHHxH+JgYv7Vp8el+swm9rm3f3Wot6qMCIOxR rYOSdklfKNUZKGqvCCAeQhDEnlED8WMBsIZPuLFzT3C1UDH9y+pfIFFD1QuZ0cDOY5PMBb JsX0RdanZddVZKgY8knlGX3vaIvyDkxsFG3Bzdvd5vuBx3MIA/50+06BQ9aA88yLF6BW/7 ShrNhHHRMmZ1ty9wz/HLFsRqsQbY4EOWEguDv6fFmwXg46bgMghWGxFAMyxW5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728214684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Vhur1vhExO/zCJvR0PMdRXrccenZ8RmzlNnlZz8EO0=; b=lnH5jVBNGLhOucopOm/nKSOHQopmZDUl20fyVaLqLaSXaU3CfhvwB0VDSqB7RtGCLwHaM3 GL2Bt9Ia3PYFxt3nu9T4S4zgLevrzczoknGLPHHTgJYdgI1REcu5JEQAqUk5YQa8XXZKSg 44CVt/PxvUmNpc+0CT3LgoGrpBzykrQI0aNd6wijv5ypgZqv0o/SzvmuwMrZ48d6mohs9D hUO2ZNTVf9rDk/LTh16fbZy5oRtd4S2D5TjUgRYI12lNE8K/iBYvNcQIzmbSgGSnxLzagW fezJeYtnmWYb/g6r2iKnxZ5pkWVsYPAgNUqMK0GcCA7C4fgzINWknY8bCjYHZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728214684; a=rsa-sha256; cv=none; b=wah8wNGQSTJzDmaRwEEu72WHgBDNMEfrdqJiatV+5PBesl43zog7Ps7JUCHBtft6PVY5gw zk3k2NJcNH1OFew8zSmr6T31egcWhdShU8/w/0qTBD7mXAonVLUpUsnZXzzsegrbON3+G1 dkt7bGbVXWH2FGG8AhEn278MujV6JUFGGpggZnPHU2DIq6qZdIsjE7cdJUet4wfthIVPzk lhPeU4LBzNXz4+1O/7rIr7y6hMHemfT3m4/KvUJL53FKmnwUuTM+1Elc/YA7t18kJ3rkQy /NEdZqhWYJtvgJFMLAwutor9dXqWUu/CvpirSqewX4IEl5O9v3GlcoBD7zcXdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XM0dm5Rbhz11RR; Sun, 6 Oct 2024 11:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 496Bc4cu090977; Sun, 6 Oct 2024 11:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 496Bc42F090974; Sun, 6 Oct 2024 11:38:04 GMT (envelope-from git) Date: Sun, 6 Oct 2024 11:38:04 GMT Message-Id: <202410061138.496Bc42F090974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 6bd8d85579a1 - main - dummymbuf: Fix code style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bd8d85579a18cf69a9b02d5852f994cb1d5a1e9 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=6bd8d85579a18cf69a9b02d5852f994cb1d5a1e9 commit 6bd8d85579a18cf69a9b02d5852f994cb1d5a1e9 Author: Igor Ostapenko AuthorDate: 2024-10-06 11:34:28 +0000 Commit: Igor Ostapenko CommitDate: 2024-10-06 11:34:28 +0000 dummymbuf: Fix code style No functional change intended. Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D46958 --- sys/net/dummymbuf.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/net/dummymbuf.c b/sys/net/dummymbuf.c index 99b6e6944752..b90fc55f458b 100644 --- a/sys/net/dummymbuf.c +++ b/sys/net/dummymbuf.c @@ -106,7 +106,7 @@ dmb_sysctl_handle_rules(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_net_dummymbuf, OID_AUTO, rules, CTLTYPE_STRING | CTLFLAG_MPSAFE | CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(dmb_rules), RULES_MAXLEN, dmb_sysctl_handle_rules, "A", - "{inet | inet6 | ethernet} {in | out} []; ...;"); + "{inet|inet6|ethernet} {in|out} [ ]; ...;"); /* * Statistics @@ -148,10 +148,10 @@ VNET_DEFINE_STATIC(pfil_hook_t, dmb_pfil_ethernet_hook); #define FEEDBACK_PFIL(pfil_type, pfil_flags, ifp, rule, msg) \ printf("dummymbuf: %s %b %s: %s: %.*s\n", \ - (pfil_type == PFIL_TYPE_IP4 ? "PFIL_TYPE_IP4" : \ - pfil_type == PFIL_TYPE_IP6 ? "PFIL_TYPE_IP6" : \ - pfil_type == PFIL_TYPE_ETHERNET ? "PFIL_TYPE_ETHERNET" : \ - "PFIL_TYPE_UNKNOWN"), \ + ((pfil_type) == PFIL_TYPE_IP4 ? "PFIL_TYPE_IP4" : \ + (pfil_type) == PFIL_TYPE_IP6 ? "PFIL_TYPE_IP6" : \ + (pfil_type) == PFIL_TYPE_ETHERNET ? "PFIL_TYPE_ETHERNET" : \ + "PFIL_TYPE_UNKNOWN"), \ (pfil_flags), "\20\21PFIL_IN\22PFIL_OUT", \ (ifp)->if_xname, \ (msg), \ @@ -211,7 +211,7 @@ bad: static bool read_rule(const char **cur, struct rule *rule, bool *eof) { - // {inet | inet6 | ethernet} {in | out} [ ]; + /* {inet|inet6|ethernet} {in|out} [ ]; */ rule->syntax_begin = NULL; rule->syntax_len = 0; @@ -219,18 +219,18 @@ read_rule(const char **cur, struct rule *rule, bool *eof) if (*cur == NULL) return (false); - // syntax_begin + /* syntax_begin */ while (**cur == ' ') (*cur)++; rule->syntax_begin = *cur; - // syntax_len + /* syntax_len */ char *delim = strchr(*cur, ';'); if (delim == NULL) return (false); rule->syntax_len = (int)(delim - *cur + 1); - // pfil_type + /* pfil_type */ if (strstr(*cur, "inet6") == *cur) { rule->pfil_type = PFIL_TYPE_IP6; *cur += strlen("inet6"); @@ -246,7 +246,7 @@ read_rule(const char **cur, struct rule *rule, bool *eof) while (**cur == ' ') (*cur)++; - // pfil_dir + /* pfil_dir */ if (strstr(*cur, "in") == *cur) { rule->pfil_dir = PFIL_IN; *cur += strlen("in"); @@ -259,7 +259,7 @@ read_rule(const char **cur, struct rule *rule, bool *eof) while (**cur == ' ') (*cur)++; - // ifname + /* ifname */ char *sp = strchr(*cur, ' '); if (sp == NULL || sp > delim) return (false); @@ -272,7 +272,7 @@ read_rule(const char **cur, struct rule *rule, bool *eof) while (**cur == ' ') (*cur)++; - // opname + /* opname */ if (strstr(*cur, "pull-head") == *cur) { rule->op = dmb_m_pull_head; *cur += strlen("pull-head"); @@ -282,12 +282,12 @@ read_rule(const char **cur, struct rule *rule, bool *eof) while (**cur == ' ') (*cur)++; - // opargs + /* opargs */ if (*cur > delim) return (false); rule->opargs = *cur; - // the next rule & eof + /* the next rule & eof */ *cur = delim + 1; while (**cur == ' ') (*cur)++;