mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +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 interactive,
|
||||||
bool test_mode_enabled)
|
bool test_mode_enabled)
|
||||||
{
|
{
|
||||||
int res, ret = -1;
|
int ret;
|
||||||
struct tevent_fd *fde;
|
struct tevent_fd *fde;
|
||||||
|
|
||||||
/* Fork if not interactive */
|
/* Fork if not interactive */
|
||||||
@ -1493,9 +1493,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
|
|||||||
ctdb_create_pidfile(ctdb);
|
ctdb_create_pidfile(ctdb);
|
||||||
|
|
||||||
/* create a unix domain stream socket to listen to */
|
/* create a unix domain stream socket to listen to */
|
||||||
res = ux_socket_bind(ctdb);
|
ret = ux_socket_bind(ctdb);
|
||||||
if (res!=0) {
|
if (ret != 0) {
|
||||||
DEBUG(DEBUG_ALERT,("Cannot continue. Exiting!\n"));
|
D_ERR("Cannot continue. Exiting!\n");
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user