dovecot-2.2: master: Removed unnecessary code duplication.

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 29 18:29:15 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/e1fd0d04a8eb
changeset: 15339:e1fd0d04a8eb
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 29 18:29:07 2012 +0200
description:
master: Removed unnecessary code duplication.
The settings parsing already does this.

diffstat:

 src/master/service.c |  13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diffs (37 lines):

diff -r 769be5b43fa6 -r e1fd0d04a8eb src/master/service.c
--- a/src/master/service.c	Mon Oct 29 18:01:54 2012 +0200
+++ b/src/master/service.c	Mon Oct 29 18:29:07 2012 +0200
@@ -231,6 +231,7 @@
 	service->idle_kill = set->idle_kill != 0 ? set->idle_kill :
 		set->master_set->default_idle_kill;
 	service->type = service->set->parsed_type;
+	service->executable = set->executable;
 
 	if (set->process_limit == 0) {
 		/* use default */
@@ -240,11 +241,6 @@
 		service->process_limit = set->process_limit;
 	}
 
-	if (set->executable == NULL) {
-		*error_r = "executable not given";
-		return NULL;
-	}
-
 	/* default gid to user's primary group */
 	if (get_uidgid(set->user, &service->uid, &service->gid, error_r) < 0) {
 		switch (set->user_default) {
@@ -290,13 +286,6 @@
 		}
 	}
 
-	if (*set->executable == '/')
-		service->executable = set->executable;
-	else {
-		service->executable =
-			p_strconcat(pool, set->master_set->libexec_dir, "/",
-				    set->executable, NULL);
-	}
 	/* set these later, so if something fails we don't have to worry about
 	   closing them */
 	service->log_fd[0] = -1;


More information about the dovecot-cvs mailing list