]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Remove strerror_ts()
authorSteffan Karger <steffan.karger@fox-it.com>
Thu, 20 Jul 2017 11:39:00 +0000 (13:39 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 20 Jul 2017 12:36:27 +0000 (14:36 +0200)
commit5315193bb9e83980ca24d4628c4e1adfb8f012a9
treec002103b27b8a8331352bfcb50f2d0f3dee3c005
parent0bc107b454c134a60e4a9d7fe7bcb5cb10743afe
Remove strerror_ts()

This function was only called in string format functions, which already
copy the contents, so all this ever did was adding redundant malloc() and
free() calls.

Also, this wasn't as thread-safe as it claims: another thread could still
change the string value between the strerror() and buf_printf() calls. So,
instead of a not needed false sense of thread-safeness, just be honest and
use strerror() directly.

(I think we should find a better place for everything currently in misc.c,
and get rid of it all together.  In this case, the better place is
/dev/null.  This patch is part of that effort.)

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1500550740-24773-1-git-send-email-steffan.karger@fox-it.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15105.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit fd2a29ab2668fea9c0ac972d5ec69f00232c88b6)
configure.ac
src/openvpn/error.c
src/openvpn/manage.c
src/openvpn/misc.c
src/openvpn/misc.h
src/openvpn/socket.c