git: 592ae60e2b2e - main - devmatch(8): Preserve const qualifier on strchr(3) and strstr(3) results
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Sep 2026 16:19:03 UTC
The branch main has been updated by kfv:
URL: https://cgit.FreeBSD.org/src/commit/?id=592ae60e2b2eff6c2ec467c34be9a457ce24b044
commit 592ae60e2b2eff6c2ec467c34be9a457ce24b044
Author: Faraz Vahedi <kfv@FreeBSD.org>
AuthorDate: 2026-09-15 16:14:13 +0000
Commit: Faraz Vahedi <kfv@FreeBSD.org>
CommitDate: 2026-09-15 16:14:13 +0000
devmatch(8): Preserve const qualifier on strchr(3) and strstr(3) results
Reviewed by: fuz, dteske
Approved by: fuz (mentor), dteske (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59667
---
sbin/devmatch/devmatch.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sbin/devmatch/devmatch.c b/sbin/devmatch/devmatch.c
index 6c6c5f3bcf79..baf52c070b70 100644
--- a/sbin/devmatch/devmatch.c
+++ b/sbin/devmatch/devmatch.c
@@ -204,7 +204,7 @@ pnpval_as_int(const char *val, const char *pnpinfo)
{
int rv;
char key[256];
- char *cp;
+ const char *cp;
if (pnpinfo == NULL)
return -1;
@@ -248,7 +248,7 @@ pnpval_as_str(const char *val, const char *pnpinfo)
{
static char retval[256];
char key[256];
- char *cp;
+ const char *cp;
if (pnpinfo == NULL) {
*retval = '\0';
@@ -282,7 +282,8 @@ search_hints(const char *bus, const char *dev, const char *pnpinfo)
char val1[256], val2[256];
int ival, len, ents, i, notme, mask, bit, v, found;
void *ptr, *walker;
- char *lastmod = NULL, *cp, *s;
+ char *lastmod = NULL, *cp;
+ const char *s;
walker = hints;
getint(&walker);