diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-11-02 12:48:44 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-11-02 12:48:44 +0000 |
commit | 992dd863098183ffca267677f7d590c3cce6feee (patch) | |
tree | 7b9c779c93ea1c6056afe276423822f070f0ff17 /server.c | |
parent | 2f813ef75d7d1cfb32d78923ae6963be7266de55 (diff) | |
download | rtmux-992dd863098183ffca267677f7d590c3cce6feee.tar.gz rtmux-992dd863098183ffca267677f7d590c3cce6feee.tar.bz2 rtmux-992dd863098183ffca267677f7d590c3cce6feee.zip |
Reorder slightly to tidy code.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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; |