From 0779b9f30aa9875c290af18a4362799668829707 Mon Sep 17 00:00:00 2001 From: bcook <> Date: Sun, 24 Aug 2014 16:11:39 +0000 Subject: constify strerror return value There is no intention to modify the string returned by strerror and doing so is forbidden by the standard. from Jonas 'Sortie' Termansen ok tedu@ deraadt@ --- src/lib/libcrypto/err/err.c | 4 ++-- src/lib/libssl/src/crypto/err/err.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 571bfaed16..0802249da4 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.38 2014/07/11 08:44:48 jsing Exp $ */ +/* $OpenBSD: err.c,v 1.39 2014/08/24 16:11:39 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -596,7 +596,7 @@ build_SYS_str_reasons(void) if (str->string == NULL) { char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]); - char *src = strerror(i); + const char *src = strerror(i); if (src != NULL) { strlcpy(*dest, src, sizeof *dest); str->string = *dest; diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c index 571bfaed16..0802249da4 100644 --- a/src/lib/libssl/src/crypto/err/err.c +++ b/src/lib/libssl/src/crypto/err/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.38 2014/07/11 08:44:48 jsing Exp $ */ +/* $OpenBSD: err.c,v 1.39 2014/08/24 16:11:39 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -596,7 +596,7 @@ build_SYS_str_reasons(void) if (str->string == NULL) { char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]); - char *src = strerror(i); + const char *src = strerror(i); if (src != NULL) { strlcpy(*dest, src, sizeof *dest); str->string = *dest; -- cgit v1.2.3-55-g6feb