Since glibc-2.43:
For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers
into their input arrays now have definitions as macros that return a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type.
https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html
Closes: https://github.com/alsa-project/alsa-lib/pull/496
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
goto __err;
}
while (1) {
- char *s = strchr(driver, '.');
+ const char *s = strchr(driver, '.');
if (s == NULL)
break;
driver = s + 1;
*/
int snd_seq_parse_address(snd_seq_t *seq, snd_seq_addr_t *addr, const char *arg)
{
- char *p, *buf;
- const char *s;
+ char *buf;
+ const char *p, *s;
char c;
long client, port = 0;
int len;
const char *identifier,
const char **list[])
{
- char *str, *str1;
+ char *str;
+ const char *str1;
int err, i;
if (uc_mgr == NULL || identifier == NULL) {
const char *identifier,
long *value)
{
- char *str, *str1;
+ char *str;
+ const char *str1;
int err;
pthread_mutex_lock(&uc_mgr->mutex);
const char *identifier,
const char *value)
{
- char *str, *str1;
+ char *str;
+ const char *str1;
int err = 0;
snd_trace(UCM, "{API call} set '%s'='%s'", identifier, value);
*/
static inline const char *strchr_with_escape(const char *str, char c)
{
- char *s;
+ const char *s;
while (1) {
s = strchr(str, c);