C23 treats the return values of strrchr() and strchr() as const char * when the input string is const-qualified. Update local variables to use const char * where appropriate to avoid discarded-qualifier warnings and build failures with -std=gnu23. No functional change intended. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>