Commit 2e7415fa authored by David Woodhouse's avatar David Woodhouse

Warn if setlocale() fails

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent cecadffb
......@@ -1093,7 +1093,9 @@ int main(int argc, char **argv)
bindtextdomain("openconnect", LOCALEDIR);
#endif
setlocale(LC_ALL, "");
if (!setlocale(LC_ALL, ""))
fprintf(stderr,
_("WARNING: Cannot set locale: %s\n"), strerror(errno));
#ifdef HAVE_NL_LANGINFO
charset = nl_langinfo(CODESET);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment