summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/strfuncs.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2008-03-02 22:51:19 +0000
committerChristopher Faylor <me@cgf.cx>2008-03-02 22:51:19 +0000
commit6452eb1f2a1f04e8336b94f822f5f2710922ef33 (patch)
tree861144b78685b5103e8ff1fdcce3ecb6dba127f7 /winsup/cygwin/strfuncs.cc
parent1264c4d4fa45be3ab77e8d384012312a53528ca7 (diff)
downloadcygnal-6452eb1f2a1f04e8336b94f822f5f2710922ef33.tar.gz
cygnal-6452eb1f2a1f04e8336b94f822f5f2710922ef33.tar.bz2
cygnal-6452eb1f2a1f04e8336b94f822f5f2710922ef33.zip
* cygtls.cc (_cygtls::init_exception_handler): Semi-revert to making only
ourselves the exception handler and nothing else. * exceptions.cc (open_stackdumpfile): Use correct format specifiers for unicode when printing nameof stackdump file. (stack_info::walk): Stop walking if ebp points into cygwin itself. (_cygtls::handle_exceptions): Detect when signal is masked and treat as if it was not caught. Reinitialize exception handler to known state to avoid subsequent attempts to call Windows exception handlers if an exception occurs in a signal handler. Revert to a 'return 0' rather than using a goto. * strfuncs.cc (sys_wcstombs_alloc): Minor formatting tweak. * winsup.h: Fix comment typo.
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r--winsup/cygwin/strfuncs.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
index d353fd868..f0623dfa6 100644
--- a/winsup/cygwin/strfuncs.cc
+++ b/winsup/cygwin/strfuncs.cc
@@ -67,7 +67,7 @@ sys_wcstombs_alloc (char **tgt_p, int type, const PWCHAR src, int slen)
ret = WideCharToMultiByte (get_cp (), 0, src, slen, NULL, 0 ,NULL, NULL);
if (ret)
{
- size_t tlen = (slen == -1 ? ret : ret + 1);
+ size_t tlen = (slen == -1) ? ret : ret + 1;
if (type == HEAP_NOTHEAP)
*tgt_p = (char *) calloc (tlen, sizeof (char));