Failed CreateFile returns INVALID_HANDLE_VALUE, not 0

This commit is contained in:
Yevgen Muntyan 2015-12-31 04:52:26 -08:00
parent 2556b108dd
commit 730c129526

View File

@ -290,10 +290,9 @@ _moo_app_input_send_msg (const char *name,
/* XXX unicode */
pipe_handle = CreateFileA (pipe_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (!pipe_handle)
if (pipe_handle == INVALID_HANDLE_VALUE)
{
err_msg = g_win32_error_message (GetLastError ());
g_warning ("could not open pipe '%s': %s", pipe_name, err_msg);
goto out;
}