Port to C23 qualifier-generic fns like strchr

* src/checkpoint.c (getarg):
* src/tar.c (expand_pax_option):
Const-qualify results of strchr etc. if args are const-qualified.
This commit is contained in:
Paul Eggert
2025-11-23 09:50:37 -08:00
parent 28556dddae
commit db65c2dd68
2 changed files with 2 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ getarg (char const *input, char const **endp, char **argbuf, idx_t *arglen)
{
if (input[0] == '{')
{
char *p = strchr (input + 1, '}');
char const *p = strchr (input + 1, '}');
if (p)
{
idx_t n = p - input;

View File

@@ -1285,7 +1285,7 @@ expand_pax_option (struct tar_args *targs, const char *arg)
while (*arg)
{
idx_t seglen = strcspn (arg, ",");
char *p = memchr (arg, '=', seglen);
char const *p = memchr (arg, '=', seglen);
if (p)
{
idx_t len = p - arg + 1;