summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_srtp.c
diff options
context:
space:
mode:
authortb <>2020-10-11 02:44:27 +0000
committertb <>2020-10-11 02:44:27 +0000
commit8ba9fa49164f17ec9a4156de8eb45d9515186459 (patch)
treeb4c654a1b989295114bd40c5e379457740b4cacc /src/lib/libssl/d1_srtp.c
parent016f3d152c7794fc6ca33b907778816d2891be00 (diff)
downloadopenbsd-8ba9fa49164f17ec9a4156de8eb45d9515186459.tar.gz
openbsd-8ba9fa49164f17ec9a4156de8eb45d9515186459.tar.bz2
openbsd-8ba9fa49164f17ec9a4156de8eb45d9515186459.zip
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
Diffstat (limited to 'src/lib/libssl/d1_srtp.c')
-rw-r--r--src/lib/libssl/d1_srtp.c8
1 files changed, 3 insertions, 5 deletions
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 @@
1/* $OpenBSD: d1_srtp.c,v 1.25 2020/10/11 01:16:31 guenther Exp $ */ 1/* $OpenBSD: d1_srtp.c,v 1.26 2020/10/11 02:44:27 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -139,7 +139,7 @@ static const SRTP_PROTECTION_PROFILE srtp_known_profiles[] = {
139}; 139};
140 140
141int 141int
142srtp_find_profile_by_name(char *profile_name, 142srtp_find_profile_by_name(const char *profile_name,
143 const SRTP_PROTECTION_PROFILE **pptr, unsigned int len) 143 const SRTP_PROTECTION_PROFILE **pptr, unsigned int len)
144{ 144{
145 const SRTP_PROTECTION_PROFILE *p; 145 const SRTP_PROTECTION_PROFILE *p;
@@ -181,10 +181,8 @@ ssl_ctx_make_profiles(const char *profiles_string,
181 STACK_OF(SRTP_PROTECTION_PROFILE) **out) 181 STACK_OF(SRTP_PROTECTION_PROFILE) **out)
182{ 182{
183 STACK_OF(SRTP_PROTECTION_PROFILE) *profiles; 183 STACK_OF(SRTP_PROTECTION_PROFILE) *profiles;
184
185 char *col; 184 char *col;
186 char *ptr = (char *)profiles_string; 185 const char *ptr = profiles_string;
187
188 const SRTP_PROTECTION_PROFILE *p; 186 const SRTP_PROTECTION_PROFILE *p;
189 187
190 if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) { 188 if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) {