]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Simplified code in ctdb_init_transport.
authorPeter Somogyi <psomogyi@gamax.hu>
Fri, 20 Apr 2007 12:47:52 +0000 (14:47 +0200)
committerPeter Somogyi <psomogyi@gamax.hu>
Fri, 20 Apr 2007 12:47:52 +0000 (14:47 +0200)
(This used to be ctdb commit 9a30e0fcbdde587cb1f3d854b8f1d22da19d9af4)

ctdb/common/ctdb.c

index 34f753a84d8162eef0297045d2742d819d082cf5..851be93e3fedd7359eb9340589723f4cff1bf367 100644 (file)
@@ -39,25 +39,21 @@ int ctdb_init_transport(struct ctdb_context *ctdb)
 {
        int     i;
        int ctdb_tcp_init(struct ctdb_context *ctdb);
-       int     transport_found = 0;
 #ifdef USE_INFINIBAND
        int ctdb_ibw_init(struct ctdb_context *ctdb);
 #endif /* USE_INFINIBAND */
 
        if (strcmp(ctdb->transport, "tcp") == 0) {
-               transport_found = 1;
                if (ctdb_tcp_init(ctdb))
                        return -1;
        }
 #ifdef USE_INFINIBAND
        else if (strcmp(ctdb->transport, "ib") == 0) {
-               transport_found = 1;
                if (ctdb_ibw_init(ctdb))
                        return -1;
        }
 #endif /* USE_INFINIBAND */
-
-       if (!transport_found) {
+       else {
                ctdb_set_error(ctdb, "Unknown transport '%s'\n", ctdb->transport);
                return -1;
        }