ctdbd_connect() explicitly returns the errno.
Using errno instead of ret misses some important
manually set return values and might use the
errno that is changed by close(fd).
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jun 26 17:21:26 CEST 2015 on sn-devel-104
ret = ctdbd_connect(&conn->fd);
if (ret != 0) {
- status = map_nt_error_from_unix(errno);
- DEBUG(1, ("ctdbd_connect failed: %s\n", strerror(errno)));
+ status = map_nt_error_from_unix(ret);
+ DEBUG(1, ("ctdbd_connect failed: %s\n", strerror(ret)));
goto fail;
}
talloc_set_destructor(conn, ctdbd_connection_destructor);