]> git.sur5r.net Git - i3/i3status/commitdiff
use stdbool instead of (int)1 and (int)0 directly
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Feb 2013 16:21:46 +0000 (17:21 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Feb 2013 16:21:46 +0000 (17:21 +0100)
src/print_time.c

index e007419314bef688ea6b74ec00e172e9dd8107c8..d19d08b86daed1a14ee2c3c691b73ace16049c73 100644 (file)
@@ -2,12 +2,13 @@
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 #include <yajl/yajl_gen.h>
 #include <yajl/yajl_version.h>
 
 #include "i3status.h"
 
 #include <yajl/yajl_gen.h>
 #include <yajl/yajl_version.h>
 
 #include "i3status.h"
 
-static int local_timezone_init = 0;
+static bool local_timezone_init = false;
 static const char *local_timezone = NULL;
 static const char *current_timezone = NULL;
 
 static const char *local_timezone = NULL;
 static const char *current_timezone = NULL;
 
@@ -15,7 +16,7 @@ void set_timezone(const char *tz) {
         if (!local_timezone_init) {
                 /* First call, initialize. */
                 local_timezone = getenv("TZ");
         if (!local_timezone_init) {
                 /* First call, initialize. */
                 local_timezone = getenv("TZ");
-                local_timezone_init = 1;
+                local_timezone_init = true;
         }
         if (tz == NULL || tz[0] == '\0') {
                 /* User wants localtime. */
         }
         if (tz == NULL || tz[0] == '\0') {
                 /* User wants localtime. */