Date: Thu, 29 Jul 2021 12:13:58 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9f43633dd055 - stable/13 - pf: Constify tag name and queue name helper functions Message-ID: <202107291213.16TCDw9c056579@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f43633dd055ba4c99f27d1e64b7b95b462226c2 commit 9f43633dd055ba4c99f27d1e64b7b95b462226c2 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-07-15 16:17:58 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-07-29 12:12:01 +0000 pf: Constify tag name and queue name helper functions No functional change intended. Reviewed by: kp Sponsored by: The FreeBSD Foundation (cherry picked from commit 81f95106b8c14d7ce935864b4705d54a8e437ed6) --- sys/netpfil/pf/pf_ioctl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 6af5197ef07d..01601db07ea0 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -100,8 +100,8 @@ SDT_PROBE_DEFINE3(pf, ioctl, function, error, "char *", "int", "int"); SDT_PROBE_DEFINE2(pf, ioctl, addrule, error, "int", "int"); SDT_PROBE_DEFINE2(pf, ioctl, nvchk, error, "int", "int"); -static struct pf_kpool *pf_get_kpool(char *, u_int32_t, u_int8_t, u_int32_t, - u_int8_t, u_int8_t, u_int8_t); +static struct pf_kpool *pf_get_kpool(const char *, u_int32_t, u_int8_t, + u_int32_t, u_int8_t, u_int8_t, u_int8_t); static void pf_mv_kpool(struct pf_kpalist *, struct pf_kpalist *); static void pf_empty_kpool(struct pf_kpalist *); @@ -113,7 +113,7 @@ static int pf_rollback_altq(u_int32_t); static int pf_commit_altq(u_int32_t); static int pf_enable_altq(struct pf_altq *); static int pf_disable_altq(struct pf_altq *); -static u_int32_t pf_qname2qid(char *); +static u_int32_t pf_qname2qid(const char *); static void pf_qid_unref(u_int32_t); #endif /* ALTQ */ static int pf_begin_rules(u_int32_t *, int, const char *); @@ -189,8 +189,8 @@ static void pf_init_tagset(struct pf_tagset *, unsigned int *, static void pf_cleanup_tagset(struct pf_tagset *); static uint16_t tagname2hashindex(const struct pf_tagset *, const char *); static uint16_t tag2hashindex(const struct pf_tagset *, uint16_t); -static u_int16_t tagname2tag(struct pf_tagset *, char *); -static u_int16_t pf_tagname2tag(char *); +static u_int16_t tagname2tag(struct pf_tagset *, const char *); +static u_int16_t pf_tagname2tag(const char *); static void tag_unref(struct pf_tagset *, u_int16_t); #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x @@ -366,7 +366,7 @@ pfattach_vnet(void) } static struct pf_kpool * -pf_get_kpool(char *anchor, u_int32_t ticket, u_int8_t rule_action, +pf_get_kpool(const char *anchor, u_int32_t ticket, u_int8_t rule_action, u_int32_t rule_number, u_int8_t r_last, u_int8_t active, u_int8_t check_ticket) { @@ -559,7 +559,7 @@ tag2hashindex(const struct pf_tagset *ts, uint16_t tag) } static u_int16_t -tagname2tag(struct pf_tagset *ts, char *tagname) +tagname2tag(struct pf_tagset *ts, const char *tagname) { struct pf_tagname *tag; u_int32_t index; @@ -638,14 +638,14 @@ tag_unref(struct pf_tagset *ts, u_int16_t tag) } static u_int16_t -pf_tagname2tag(char *tagname) +pf_tagname2tag(const char *tagname) { return (tagname2tag(&V_pf_tags, tagname)); } #ifdef ALTQ static u_int32_t -pf_qname2qid(char *qname) +pf_qname2qid(const char *qname) { return ((u_int32_t)tagname2tag(&V_pf_qids, qname)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107291213.16TCDw9c056579>