summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-11-02 12:48:44 +0000
committernicm <nicm@openbsd.org>2009-11-02 12:48:44 +0000
commit952d8654c11d8958d6f19429a5bfdaf9a98eab36 (patch)
tree0164c464b34d1903cdd6e84c1cde2ce4364e23e4
parentInclude the type override definitions and use the correct target (diff)
downloadwireguard-openbsd-952d8654c11d8958d6f19429a5bfdaf9a98eab36.tar.xz
wireguard-openbsd-952d8654c11d8958d6f19429a5bfdaf9a98eab36.zip
Reorder slightly to tidy code.
-rw-r--r--usr.bin/tmux/server.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 02d5307861a..19d795b7c5d 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.63 2009/10/27 13:03:33 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.64 2009/11/02 12:48:44 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;