aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-08-28 17:32:21 +0530
committersinanmohd <sinan@sinanmohd.com>2024-08-28 17:32:21 +0530
commit8b4549f191bd3c6a12388e57166cba8c8979a663 (patch)
tree7a6a1a10968c128db3146fd7aa7d8162a72a21e6 /src
parent4e66751204365fdaf7ae44cd3d11492541dade43 (diff)
jobs/job_read: do not override job_read_cache status
Diffstat (limited to 'src')
-rw-r--r--src/jobs.c5
1 files changed, 3 insertions, 2 deletions
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);