]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_console.cc (fhandler_console::open_shared_console): Don't zero
authorChristopher Faylor <me@cgf.cx>
Sun, 5 Jun 2011 02:10:31 +0000 (02:10 +0000)
committerChristopher Faylor <me@cgf.cx>
Sun, 5 Jun 2011 02:10:31 +0000 (02:10 +0000)
handle to open_shared since it is supposed to be an input.
(enum_windows): Set handle input to open_shared to NULL since it does not
represent any previously opened shared region.
* shared.cc (open_shared): Tweak debugging output.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_console.cc
winsup/cygwin/shared.cc

index 1272c87da31928c47d2eb096e2f69a17fc28d60e..1f8f5d5c64f71df27b7e588ea4da6f7c36ecf348 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-04  Christopher Faylor  <me.cygwin2011@cgf.cx>
+
+       * fhandler_console.cc (fhandler_console::open_shared_console): Don't
+       zero handle to open_shared since it is supposed to be an input.
+       (enum_windows): Set handle input to open_shared to NULL since it does
+       not represent any previously opened shared region.
+       * shared.cc (open_shared): Tweak debugging output.
+
 2011-06-03  Christopher Faylor  <me.cygwin2011@cgf.cx>
 
        * ntdll.h (FILE_PIPE_*): Define constants.
index 399830b791fe1b4556a49f7960a0a6baed2ba2b7..6766cb02ec10f0f23ae400f7383f76c63481de8d 100644 (file)
@@ -82,7 +82,6 @@ fhandler_console::open_shared_console (HWND hw, HANDLE& h, bool& create)
 {
   wchar_t namebuf[(sizeof "XXXXXXXXXXXXXXXXXX-consNNNNNNNNNN")];
   __small_swprintf (namebuf, L"%S-cons%p", &installation_key, hw);
-  h = NULL;
 
   shared_locations m = create ? SH_JUSTCREATE: SH_JUSTOPEN;
   console_state *res = (console_state *)
@@ -108,7 +107,7 @@ enum_windows (HWND hw, LPARAM lp)
   console_unit *this1 = (console_unit *) lp;
   if (hw == this1->me)
     return TRUE;
-  HANDLE h;
+  HANDLE h = NULL;
   fhandler_console::console_state *cs;
   if ((cs = fhandler_console::open_shared_console (hw, h)))
     {
index 22138d0be9350dfd45dccf0d3679397818e410e2..a4b5b006ae6cb6afe249b1e3ef7e2c149657f3c0 100644 (file)
@@ -301,7 +301,7 @@ open_shared (const WCHAR *name, int n, HANDLE& shared_h, DWORD size,
       offsets[SH_TOTAL_SIZE] += delta;
     }
 
-  debug_printf ("name %W, n %d, shared %p (wanted %p), h %p", mapname, n, shared, addr, shared_h);
+  debug_printf ("name %W, n %d, shared %p (wanted %p), h %p, *m %d", mapname, n, shared, addr, shared_h, *m);
 
   return shared;
 }
This page took 0.038704 seconds and 5 git commands to generate.