diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-05-17 16:08:37 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-05-28 11:22:25 +1000 |
commit | 763183015298f9ac46e8bafad54938b2fb321f4c (patch) | |
tree | 9b4413d46915ec12a3e636bdb28d250bb2115c44 /ctdb | |
parent | 0e1f20fe03b9303c29deb1a82dba8b0d457e1677 (diff) | |
download | samba-763183015298f9ac46e8bafad54938b2fb321f4c.tar.gz |
server: Replace BOOL datatype with bool, True/False with true/false
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/client/ctdb_client.c | 8 | ||||
-rw-r--r-- | ctdb/common/rb_tree.c | 6 | ||||
-rw-r--r-- | ctdb/include/includes.h | 7 | ||||
-rw-r--r-- | ctdb/lib/util/util.c | 2 | ||||
-rw-r--r-- | ctdb/server/ctdb_call.c | 8 | ||||
-rw-r--r-- | ctdb/server/ctdb_control.c | 2 | ||||
-rw-r--r-- | ctdb/server/ctdb_daemon.c | 4 | ||||
-rw-r--r-- | ctdb/server/ctdb_freeze.c | 2 | ||||
-rw-r--r-- | ctdb/server/ctdb_takeover.c | 2 | ||||
-rw-r--r-- | ctdb/server/ctdbd.c | 2 |
10 files changed, 19 insertions, 24 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 69b0a04888c..9162a476fa5 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -2023,7 +2023,7 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA if (data.dsize < sizeof(uint32_t) || d->length != data.dsize) { DEBUG(DEBUG_ERR,("Bad data size %u in traverse_handler\n", (unsigned)data.dsize)); - state->done = True; + state->done = true; return; } @@ -2034,7 +2034,7 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA if (key.dsize == 0 && data.dsize == 0) { /* end of traverse */ - state->done = True; + state->done = true; return; } @@ -2046,7 +2046,7 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA } if (state->fn(ctdb, key, data, state->private_data) != 0) { - state->done = True; + state->done = true; } state->count++; @@ -2071,7 +2071,7 @@ static int ctdb_traverse_ext(struct ctdb_db_context *ctdb_db, uint64_t srvid = (getpid() | 0xFLL<<60); struct traverse_state state; - state.done = False; + state.done = false; state.count = 0; state.private_data = private_data; state.fn = fn; diff --git a/ctdb/common/rb_tree.c b/ctdb/common/rb_tree.c index bff7c5a4c4f..6b131bc0932 100644 --- a/ctdb/common/rb_tree.c +++ b/ctdb/common/rb_tree.c @@ -447,7 +447,7 @@ trbt_delete_case1(trbt_node_t *node) } static void -delete_node(trbt_node_t *node, BOOL from_destructor) +delete_node(trbt_node_t *node, bool from_destructor) { trbt_node_t *parent, *child, dc; trbt_node_t *temp = NULL; @@ -606,7 +606,7 @@ finished: */ static int node_destructor(trbt_node_t *node) { - delete_node(node, True); + delete_node(node, true); return 0; } @@ -746,7 +746,7 @@ trbt_delete32(trbt_tree_t *tree, uint32_t key) while(node){ if(key==node->key32){ - delete_node(node, False); + delete_node(node, false); return; } if(key<node->key32){ diff --git a/ctdb/include/includes.h b/ctdb/include/includes.h index b5655335af5..e0ce06b82a4 100644 --- a/ctdb/include/includes.h +++ b/ctdb/include/includes.h @@ -18,11 +18,6 @@ #include "tevent.h" -typedef bool BOOL; - -#define True 1 -#define False 0 - extern int LogLevel; extern int this_log_level; @@ -64,7 +59,7 @@ double timeval_delta(struct timeval *tv2, struct timeval *tv); char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx); char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len); _PUBLIC_ const char **str_list_add(const char **list, const char *s); -_PUBLIC_ int set_blocking(int fd, BOOL set); +_PUBLIC_ int set_blocking(int fd, bool set); #include "lib/util/debug.h" #include "lib/util/util.h" diff --git a/ctdb/lib/util/util.c b/ctdb/lib/util/util.c index e19b2dc1fe9..af528059954 100644 --- a/ctdb/lib/util/util.c +++ b/ctdb/lib/util/util.c @@ -28,7 +28,7 @@ if BSD use FNDELAY **/ -_PUBLIC_ int set_blocking(int fd, BOOL set) +_PUBLIC_ int set_blocking(int fd, bool set) { int val; #ifdef O_NONBLOCK diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index fe7e947c036..b7a4fe3915d 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -462,7 +462,7 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr /* fetch the current record */ ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header, hdr, &data2, - ctdb_call_input_pkt, ctdb, False); + ctdb_call_input_pkt, ctdb, false); if (ret == -1) { ctdb_fatal(ctdb, "ctdb_req_dmaster failed to fetch record"); return; @@ -723,7 +723,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) if the call will be answered locally */ ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, call->key, &header, hdr, &data, - ctdb_call_input_pkt, ctdb, False); + ctdb_call_input_pkt, ctdb, false); if (ret == -1) { ctdb_send_error(ctdb, hdr, ret, "ltdb fetch failed in ctdb_request_call"); return; @@ -977,7 +977,7 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) key.dsize = state->c->keylen; key.dptr = state->c->data; ret = ctdb_ltdb_lock_requeue(ctdb_db, key, hdr, - ctdb_call_input_pkt, ctdb, False); + ctdb_call_input_pkt, ctdb, false); if (ret == -2) { return; } @@ -1063,7 +1063,7 @@ void ctdb_reply_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) } ret = ctdb_ltdb_lock_requeue(ctdb_db, key, hdr, - ctdb_call_input_pkt, ctdb, False); + ctdb_call_input_pkt, ctdb, false); if (ret == -2) { return; } diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c index 2a16a23ad80..5c1eedd4c98 100644 --- a/ctdb/server/ctdb_control.c +++ b/ctdb/server/ctdb_control.c @@ -703,7 +703,7 @@ void ctdb_request_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr struct ctdb_req_control *c = (struct ctdb_req_control *)hdr; TDB_DATA data, *outdata; int32_t status; - bool async_reply = False; + bool async_reply = false; const char *errormsg = NULL; data.dptr = &c->data[0]; diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 899b3bd8fa8..a61e7d369d4 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -657,7 +657,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client, ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header, (struct ctdb_req_header *)c, &data, - daemon_incoming_packet_wrap, w, True); + daemon_incoming_packet_wrap, w, true); if (ret == -2) { /* will retry later */ CTDB_DECREMENT_STAT(ctdb, pending_calls); @@ -1068,7 +1068,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, return 0; } - tdb_reopen_all(False); + tdb_reopen_all(false); if (do_fork) { setsid(); diff --git a/ctdb/server/ctdb_freeze.c b/ctdb/server/ctdb_freeze.c index 56dc19c2c2d..c8941f20a79 100644 --- a/ctdb/server/ctdb_freeze.c +++ b/ctdb/server/ctdb_freeze.c @@ -335,7 +335,7 @@ int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control * DLIST_ADD(ctdb->freeze_handles[priority]->waiters, w); /* we won't reply till later */ - *async_reply = True; + *async_reply = true; return 0; } diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index ee6c7239542..0ba12b13166 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -3874,6 +3874,6 @@ int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb, struct ctdb_re ctdb_reloadips_timeout_event, h); /* we reply later */ - *async_reply = True; + *async_reply = true; return 0; } diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index 8eee5f2784c..ddda8ffbe21 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -346,5 +346,5 @@ int main(int argc, const char *argv[]) } /* start the protocol running (as a child) */ - return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog, options.public_address_list); + return ctdb_start_daemon(ctdb, interactive?false:true, options.use_syslog, options.public_address_list); } |