From 8ba9fa49164f17ec9a4156de8eb45d9515186459 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 11 Oct 2020 02:44:27 +0000 Subject: Make profile_name const in srtp_find_profile_by_name() There is no reason (and there never was any) for profile_name to be non-const, it was always just passed to strncmp(). Changing this allows removing an ugly instance of casting away const. ok guenther jsing --- src/lib/libssl/d1_srtp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/libssl/d1_srtp.c') diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c index 6d4a1661e1..1ea678a218 100644 --- a/src/lib/libssl/d1_srtp.c +++ b/src/lib/libssl/d1_srtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_srtp.c,v 1.25 2020/10/11 01:16:31 guenther Exp $ */ +/* $OpenBSD: d1_srtp.c,v 1.26 2020/10/11 02:44:27 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -139,7 +139,7 @@ static const SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { }; int -srtp_find_profile_by_name(char *profile_name, +srtp_find_profile_by_name(const char *profile_name, const SRTP_PROTECTION_PROFILE **pptr, unsigned int len) { const SRTP_PROTECTION_PROFILE *p; @@ -181,10 +181,8 @@ ssl_ctx_make_profiles(const char *profiles_string, STACK_OF(SRTP_PROTECTION_PROFILE) **out) { STACK_OF(SRTP_PROTECTION_PROFILE) *profiles; - char *col; - char *ptr = (char *)profiles_string; - + const char *ptr = profiles_string; const SRTP_PROTECTION_PROFILE *p; if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) { -- cgit v1.2.3-55-g6feb