mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
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)
This commit is contained in:
parent
0e1f20fe03
commit
7631830152
@ -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;
|
||||
|
@ -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){
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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];
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user