diff options
| author | Paul Eggert | 2011-02-25 15:39:18 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-25 15:39:18 -0800 |
| commit | 7e6bb4c94c9b4d78d9e626f32fc930cd76169e76 (patch) | |
| tree | 90eb3a2b97034d79c7c8990b240fc6a9d3cb8f24 /lib-src | |
| parent | b0bbc07d9a136869d1d9acfdd8e14674515eb196 (diff) | |
| download | emacs-7e6bb4c94c9b4d78d9e626f32fc930cd76169e76.tar.gz emacs-7e6bb4c94c9b4d78d9e626f32fc930cd76169e76.zip | |
* emacsclient.c (main): Avoid dangling 'if'.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 2 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 30 |
2 files changed, 17 insertions, 15 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5b8033d2aec..d1203b2ff96 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-02-25 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-02-25 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * emacsclient.c (main): Avoid dangling 'if'. | ||
| 4 | |||
| 3 | * emacsclient.c: Redo local variables to avoid shadowing problems. | 5 | * emacsclient.c: Redo local variables to avoid shadowing problems. |
| 4 | (message, socket_status, start_daemon_and_retry_set_socket): | 6 | (message, socket_status, start_daemon_and_retry_set_socket): |
| 5 | Rename locals. | 7 | Rename locals. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 070d6370714..b0087c124ec 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1543,21 +1543,21 @@ main (int argc, char **argv) | |||
| 1543 | null_server_file = (server_file == NULL); | 1543 | null_server_file = (server_file == NULL); |
| 1544 | } | 1544 | } |
| 1545 | 1545 | ||
| 1546 | if ((emacs_socket = set_socket (alternate_editor | 1546 | emacs_socket = set_socket (alternate_editor || start_daemon_if_needed); |
| 1547 | || start_daemon_if_needed)) == INVALID_SOCKET) | 1547 | if (emacs_socket == INVALID_SOCKET) |
| 1548 | if (start_daemon_if_needed) | 1548 | { |
| 1549 | { | 1549 | if (! start_daemon_if_needed) |
| 1550 | /* Reset socket_name and server_file if they were NULL | 1550 | fail (); |
| 1551 | before the set_socket call. */ | 1551 | |
| 1552 | if (null_socket_name) | 1552 | /* Reset socket_name and server_file if they were NULL |
| 1553 | socket_name = NULL; | 1553 | before the set_socket call. */ |
| 1554 | if (null_server_file) | 1554 | if (null_socket_name) |
| 1555 | server_file = NULL; | 1555 | socket_name = NULL; |
| 1556 | 1556 | if (null_server_file) | |
| 1557 | start_daemon_and_retry_set_socket (); | 1557 | server_file = NULL; |
| 1558 | } | 1558 | |
| 1559 | else | 1559 | start_daemon_and_retry_set_socket (); |
| 1560 | fail (); | 1560 | } |
| 1561 | 1561 | ||
| 1562 | cwd = get_current_dir_name (); | 1562 | cwd = get_current_dir_name (); |
| 1563 | if (cwd == 0) | 1563 | if (cwd == 0) |