From 992dd863098183ffca267677f7d590c3cce6feee Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 2 Nov 2009 12:48:44 +0000 Subject: [PATCH] Reorder slightly to tidy code. --- server.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server.c b/server.c index 1877aad1..ed551694 100644 --- a/server.c +++ b/server.c @@ -272,14 +272,13 @@ server_start(char *path) srv_fd = server_create_socket(); server_client_create(pair[1]); - if (access(SYSTEM_CFG, R_OK) != 0) { - if (errno != ENOENT) { - xasprintf( - &cause, "%s: %s", strerror(errno), SYSTEM_CFG); + if (access(SYSTEM_CFG, R_OK) == 0) { + if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0) goto error; - } - } else if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0) + } else if (errno != ENOENT) { + xasprintf(&cause, "%s: %s", strerror(errno), SYSTEM_CFG); goto error; + } if (cfg_file != NULL && load_cfg(cfg_file, NULL, &cause) != 0) goto error;