summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-02-10 17:21:46 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-02-10 17:21:46 +0100
commit8c273e54b867aeedcd1eadfbd6f4e4fad3690f74 (patch)
treeea5850fab3e4d46dc2bd9348bd2036eb65fa3216 /src
parent78cd0e1e0165b59638e4bf0af2e48612bd35fb1b (diff)
use stdbool instead of (int)1 and (int)0 directly
Diffstat (limited to 'src')
-rw-r--r--src/print_time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/print_time.c b/src/print_time.c
index e007419..d19d08b 100644
--- a/src/print_time.c
+++ b/src/print_time.c
@@ -2,12 +2,13 @@
#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"
-static int local_timezone_init = 0;
+static bool local_timezone_init = false;
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");
- local_timezone_init = 1;
+ local_timezone_init = true;
}
if (tz == NULL || tz[0] == '\0') {
/* User wants localtime. */