Browse Source

graphics-hook: Kill early return

jpark37 4 years ago
parent
commit
d9d87e6502
1 changed files with 3 additions and 3 deletions
  1. 3 3
      plugins/win-capture/graphics-hook/graphics-hook.c

+ 3 - 3
plugins/win-capture/graphics-hook/graphics-hook.c

@@ -68,12 +68,12 @@ bool init_pipe(void)
 	char new_name[64];
 	sprintf(new_name, "%s%lu", PIPE_NAME, GetCurrentProcessId());
 
-	if (!ipc_pipe_client_open(&pipe, new_name)) {
+	const bool success = ipc_pipe_client_open(&pipe, new_name);
+	if (!success) {
 		DbgOut("[OBS] Failed to open pipe\n");
-		return false;
 	}
 
-	return true;
+	return success;
 }
 
 static HANDLE init_event(const wchar_t *name, DWORD pid)