From: Kern Sibbald Date: Sun, 29 Oct 2017 08:26:05 +0000 (+0100) Subject: Remove some old C int code and use bool X-Git-Tag: Release-9.0.5~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9595ad69c91bf9f7cd394af5ad423bb5f560d550;p=bacula%2Fbacula Remove some old C int code and use bool --- diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c index f2e1c51043..bb40566017 100644 --- a/bacula/src/dird/ua_label.c +++ b/bacula/src/dird/ua_label.c @@ -325,7 +325,7 @@ static int do_label(UAContext *ua, const char *cmd, int relabel) POOL_DBR pr; bool print_reminder = true; bool label_barcodes = false; - int ok = FALSE; + bool ok = false; int i, j; int drive; bool media_record_exists = false; diff --git a/bacula/src/dird/ua_output.c b/bacula/src/dird/ua_output.c index 3e940a69c2..c18f340a92 100644 --- a/bacula/src/dird/ua_output.c +++ b/bacula/src/dird/ua_output.c @@ -1003,8 +1003,8 @@ void do_messages(UAContext *ua, const char *cmd) if (do_truncate) { (void)ftruncate(fileno(con_fd), 0L); } - console_msg_pending = FALSE; - ua->user_notified_msg_pending = FALSE; + console_msg_pending = false; + ua->user_notified_msg_pending = false; pthread_cleanup_pop(0); Vw(con_lock); } diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 5e90f0fefa..44a7dc1e40 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -58,7 +58,7 @@ int verbose = 0; /* increase User messages */ int64_t debug_level = 0; /* debug level */ int64_t debug_level_tags = 0; /* debug tags */ int32_t debug_flags = 0; /* debug flags */ -int console_msg_pending = false; +bool console_msg_pending = false; utime_t daemon_start_time = 0; /* Daemon start time */ FILE *con_fd = NULL; /* Console file descriptor */ brwlock_t con_lock; /* Console lock structure */ @@ -420,7 +420,7 @@ void init_console_msg(const char *wd) con_fname, be.bstrerror()); } if (lseek(fd, 0, SEEK_END) > 0) { - console_msg_pending = 1; + console_msg_pending = true; } close(fd); con_fd = bfopen(con_fname, "a+b"); diff --git a/bacula/src/lib/message.h b/bacula/src/lib/message.h index 075f9e3774..c6daa326a8 100644 --- a/bacula/src/lib/message.h +++ b/bacula/src/lib/message.h @@ -195,6 +195,6 @@ extern DLL_IMP_EXP char my_name[]; extern DLL_IMP_EXP const char * working_directory; extern DLL_IMP_EXP utime_t daemon_start_time; -extern DLL_IMP_EXP int console_msg_pending; +extern DLL_IMP_EXP bool console_msg_pending; extern DLL_IMP_EXP FILE * con_fd; /* Console file descriptor */ extern DLL_IMP_EXP brwlock_t con_lock; /* Console lock structure */