summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/strace.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/strace.cc')
-rw-r--r--winsup/cygwin/strace.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 64999831e..19b6e5050 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -254,8 +254,10 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap
FILE_SHARE_WRITE | FILE_SHARE_WRITE,
&sec_none, OPEN_EXISTING, 0, 0);
if (h != INVALID_HANDLE_VALUE)
- WriteFile (h, buf, len, &done, 0);
- CloseHandle (h);
+ {
+ WriteFile (h, buf, len, &done, 0);
+ CloseHandle (h);
+ }
}
}