Skip to content

Commit 66f3c75

Browse files
committed
job-list: get jsctx variable more efficiently
Problem: In several locations an extra level of indirection is used to get the 'jsctx' value. Solution: Get the `jsctx` value more directly.
1 parent 476ba90 commit 66f3c75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/job-list/job_state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static void update_job_state_and_list (struct list_ctx *ctx,
283283
double timestamp)
284284
{
285285
zlistx_t *oldlist, *newlist;
286-
struct job_state_ctx *jsctx = job->ctx->jsctx;
286+
struct job_state_ctx *jsctx = ctx->jsctx;
287287

288288
oldlist = get_list (jsctx, job->state);
289289
newlist = get_list (jsctx, newstate);
@@ -802,7 +802,7 @@ static int add_state_transition (struct job *job,
802802
static void process_next_state (struct list_ctx *ctx, struct job *job)
803803
{
804804
struct state_transition *st;
805-
struct job_state_ctx *jsctx = job->ctx->jsctx;
805+
struct job_state_ctx *jsctx = ctx->jsctx;
806806

807807
while ((st = zlist_head (job->next_states))
808808
&& !st->processed) {

0 commit comments

Comments
 (0)