From 3ba9b5e5ada2dda8a15f8265f9d24da712c1cb3d Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Sat, 30 Jul 2016 17:17:26 +0100 Subject: [PATCH] use job_queue_remove() --- conf.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/conf.c b/conf.c index 3ac6bd2..eb43b54 100644 --- a/conf.c +++ b/conf.c @@ -883,8 +883,6 @@ delete_file(const char *user_name) cf_t *prev_file = NULL; cl_t *line; cl_t *cur_line; - struct job_t *j = NULL; - struct job_t *prev_j; int i, k; struct cl_t **s_a = NULL; exe_t *e = NULL; @@ -966,18 +964,7 @@ delete_file(const char *user_name) cur_line = line->cl_next; /* remove from the main queue */ - prev_j = NULL; - for (j = queue_base; j != NULL; j = j->j_next) - if (j->j_line == line) { - if (prev_j != NULL) - prev_j->j_next = j->j_next; - else - queue_base = j->j_next; - Free_safe(j); - break; - } - else - prev_j = j; + job_queue_remove(line); /* free line itself */ free_line(line); -- 2.47.3