Skip to content

Commit

Permalink
client: remove unnecessary chdir() calls in GPU detection
Browse files Browse the repository at this point in the history
GPU detection code goes back and forth between program and data
directories but this is unnecessary because run_program() already takes
care of running the program in correct directory.

Fixes two "ignoring return value" warnings from GCC/GLIBC.
  • Loading branch information
JuhaSointusalo committed Sep 22, 2018
1 parent 2107086 commit 1296c86
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions client/gpu_detect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,6 @@ int COPROCS::launch_child_process_to_detect_gpus() {
NULL
};

chdir(client_dir);

retval = run_program(
client_dir,
client_path,
Expand All @@ -672,8 +670,6 @@ int COPROCS::launch_child_process_to_detect_gpus() {
prog
);

chdir(data_dir);

if (retval) {
if (log_flags.coproc_debug) {
msg_printf(0, MSG_INFO,
Expand Down

0 comments on commit 1296c86

Please sign in to comment.