]> 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:18:07 +0000 (14:18 +0200)
commitfd2a29ab2668fea9c0ac972d5ec69f00232c88b6
treed2637328c9c45e83380fbc1c6efedf5718e4b5ce
parentad7f7e56d34bbf477a7e5639f1b78b2c7e58186c
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>
configure.ac
src/openvpn/error.c
src/openvpn/manage.c
src/openvpn/misc.c
src/openvpn/misc.h
src/openvpn/socket.c