From 8b4549f191bd3c6a12388e57166cba8c8979a663 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 28 Aug 2024 17:32:21 +0530 Subject: jobs/job_read: do not override job_read_cache status --- src/jobs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jobs.c b/src/jobs.c index 458635b..8f4efb1 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -455,7 +455,7 @@ static int job_read_cache(struct job *job) i++; } - ret = 0; + ret = JOB_READ_SUCCESS; out_free_line: free(line); @@ -548,9 +548,10 @@ int job_read(FILE *stream, struct job **job) ret = job_read_cache(j); if (ret < 0) goto out_free; + } else { + ret = JOB_READ_SUCCESS; } - ret = JOB_READ_SUCCESS; out_free: cJSON_Delete(root); -- cgit v1.2.3