Skip to content
Snippets Groups Projects
Commit 6ec9b698 authored by Morris Jette's avatar Morris Jette
Browse files

Don't re-use a variable

Counter became invalid due to re-use of a variable within a loop.
parent 3a51703e
No related branches found
No related tags found
No related merge requests found
...@@ -161,7 +161,7 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, ...@@ -161,7 +161,7 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus,
void (*signal_function)(int), void (*signal_function)(int),
sig_atomic_t *destroy_job) sig_atomic_t *destroy_job)
{ {
int i, rc; int i, j, rc;
unsigned long step_wait = 0, my_sleep = 0; unsigned long step_wait = 0, my_sleep = 0;
uint16_t base_dist; uint16_t base_dist;
...@@ -352,8 +352,8 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, ...@@ -352,8 +352,8 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus,
"retrying"); "retrying");
} }
xsignal_unblock(sig_array); xsignal_unblock(sig_array);
for (i = 0; sig_array[i]; i++) for (j = 0; sig_array[j]; j++)
xsignal(sig_array[i], signal_function); xsignal(sig_array[j], signal_function);
my_sleep = (getpid() % 1000) * 100 + 100000; my_sleep = (getpid() % 1000) * 100 + 100000;
} else { } else {
verbose("Job step creation still disabled, retrying"); verbose("Job step creation still disabled, retrying");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment