Date: Thu, 15 Jul 2021 16:25:47 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 81f95106b8c1 - main - pf: Constify tag name and queue name helper functions Message-ID: <202107151625.16FGPlMb046236@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81f95106b8c14d7ce935864b4705d54a8e437ed6 commit 81f95106b8c14d7ce935864b4705d54a8e437ed6 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-07-15 16:17:58 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-07-15 16:17:58 +0000 pf: Constify tag name and queue name helper functions No functional change intended. Reviewed by: kp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31168 --- 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 e0f7216ce5fc..45d446697981 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -99,8 +99,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 *); @@ -112,7 +112,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 *); @@ -188,8 +188,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 @@ -356,7 +356,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) { @@ -549,7 +549,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; @@ -628,14 +628,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?202107151625.16FGPlMb046236>