Skip to content

Commit 9344d1d

Browse files
committed
Remove a useless check
We already did a `strlen` on the `debugger_script_path`, so it's too late to check if it's NULL here!
1 parent b8a0503 commit 9344d1d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Python/remote_debugging.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -878,19 +878,17 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
878878
return -1;
879879
}
880880

881-
if (debugger_script_path != NULL) {
882-
uintptr_t debugger_script_path_addr = (
883-
thread_state_addr +
884-
debug_offsets.debugger_support.remote_debugger_support +
885-
debug_offsets.debugger_support.debugger_script_path);
886-
if (0 != write_memory(
887-
handle,
888-
debugger_script_path_addr,
889-
strlen(debugger_script_path) + 1,
890-
debugger_script_path))
891-
{
892-
return -1;
893-
}
881+
uintptr_t debugger_script_path_addr = (
882+
thread_state_addr +
883+
debug_offsets.debugger_support.remote_debugger_support +
884+
debug_offsets.debugger_support.debugger_script_path);
885+
if (0 != write_memory(
886+
handle,
887+
debugger_script_path_addr,
888+
strlen(debugger_script_path) + 1,
889+
debugger_script_path))
890+
{
891+
return -1;
894892
}
895893

896894
int pending_call = 1;

0 commit comments

Comments
 (0)