RIP BOOL. Convert BOOL -> bool. I found a few interesting
[samba.git] / source3 / profile / profile.c
index 76f6386c51a9873aa50c859991e95773d9f6e068..50751d546ec4de060b4fafffc3ab1df008a016df 100644 (file)
 
 #ifdef WITH_PROFILE
 static int shm_id;
-static BOOL read_only;
+static bool read_only;
 #if defined(HAVE_CLOCK_GETTIME)
 clockid_t __profile_clock;
-BOOL have_profiling_clock = False;
+bool have_profiling_clock = False;
 #endif
 #endif
 
 struct profile_header *profile_h;
 struct profile_stats *profile_p;
 
-BOOL do_profile_flag = False;
-BOOL do_profile_times = False;
+bool do_profile_flag = False;
+bool do_profile_times = False;
 
 /****************************************************************************
 Set a profiling level.
@@ -89,6 +89,8 @@ void set_profile_level(int level, struct server_id src)
 #endif /* WITH_PROFILE */
 }
 
+#ifdef WITH_PROFILE
+
 /****************************************************************************
 receive a set profile level message
 ****************************************************************************/
@@ -134,7 +136,6 @@ static void reqprofile_message(struct messaging_context *msg_ctx,
 /*******************************************************************
   open the profiling shared memory area
   ******************************************************************/
-#ifdef WITH_PROFILE
 
 #ifdef HAVE_CLOCK_GETTIME
 
@@ -195,7 +196,7 @@ static void init_clock_gettime(void)
 }
 #endif
 
-BOOL profile_setup(struct messaging_context *msg_ctx, BOOL rdonly)
+bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
 {
        struct shmid_ds shm_ds;
 
@@ -250,7 +251,7 @@ BOOL profile_setup(struct messaging_context *msg_ctx, BOOL rdonly)
 
        if (shm_ds.shm_segsz != sizeof(*profile_h)) {
                DEBUG(0,("WARNING: profile size is %d (expected %d). Deleting\n",
-                        (int)shm_ds.shm_segsz, sizeof(*profile_h)));
+                        (int)shm_ds.shm_segsz, (int)sizeof(*profile_h)));
                if (shmctl(shm_id, IPC_RMID, &shm_ds) == 0) {
                        goto again;
                } else {