diff options
author | Peter Somogyi <psomogyi@gamax.hu> | 2007-04-20 14:47:52 +0200 |
---|---|---|
committer | Peter Somogyi <psomogyi@gamax.hu> | 2007-04-20 14:47:52 +0200 |
commit | 933cb2efce9516aad67dfad6aa1de77a0bf8af25 (patch) | |
tree | 7a6e2472b69bb0a2ec919b8e3e137367f5bcc22a /ctdb/common | |
parent | e5f2e5e5eb56c390c68c1ac79a32fb068510fc41 (diff) | |
download | samba-933cb2efce9516aad67dfad6aa1de77a0bf8af25.tar.gz |
Simplified code in ctdb_init_transport.
(This used to be ctdb commit 9a30e0fcbdde587cb1f3d854b8f1d22da19d9af4)
Diffstat (limited to 'ctdb/common')
-rw-r--r-- | ctdb/common/ctdb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c index 34f753a84d8..851be93e3fe 100644 --- a/ctdb/common/ctdb.c +++ b/ctdb/common/ctdb.c @@ -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; } |