mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Clean up call to bind socket
Variable res is only used once and ret is re-used many times. Drop res, use ret, which doesn't need to be initialised. Modernise debug macro. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
9404f8631e
commit
78c3b5b6a8
@ -1470,7 +1470,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
|
||||
bool interactive,
|
||||
bool test_mode_enabled)
|
||||
{
|
||||
int res, ret = -1;
|
||||
int ret;
|
||||
struct tevent_fd *fde;
|
||||
|
||||
/* Fork if not interactive */
|
||||
@ -1493,9 +1493,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
|
||||
ctdb_create_pidfile(ctdb);
|
||||
|
||||
/* create a unix domain stream socket to listen to */
|
||||
res = ux_socket_bind(ctdb);
|
||||
if (res!=0) {
|
||||
DEBUG(DEBUG_ALERT,("Cannot continue. Exiting!\n"));
|
||||
ret = ux_socket_bind(ctdb);
|
||||
if (ret != 0) {
|
||||
D_ERR("Cannot continue. Exiting!\n");
|
||||
exit(10);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user