aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-13 10:03:11 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-13 10:03:11 +0000
commitc96a0b3b3ce22f0db45e61160d414258917e4bcd (patch)
tree6e37370440c7828c672b496b94b67f6dc59b58f1 /terminal.c
parentmbstate: fix compile warning on systems where mbstate_t isn't an integral (diff)
misc: replace all explicit zero-initializers with empty initializers
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/terminal.c b/terminal.c
index 8c0ec60c..b2017afc 100644
--- a/terminal.c
+++ b/terminal.c
@@ -129,7 +129,7 @@ fdm_ptmx_out(struct fdm *fdm, int fd, int events, void *data)
}
#if PTMX_TIMING
-static struct timespec last = {0};
+static struct timespec last = {};
#endif
static bool
@@ -325,7 +325,7 @@ fdm_blink(struct fdm *fdm, int fd, int events, void *data)
term->blink.active = false;
term->blink.state = BLINK_ON;
- static const struct itimerspec disarm = {{0}};
+ static const struct itimerspec disarm = {};
if (timerfd_settime(term->blink.fd, 0, &disarm, NULL) < 0)
LOG_ERRNO("failed to disarm blink timer");
} else
@@ -423,11 +423,11 @@ fdm_delayed_render(struct fdm *fdm, int fd, int events, void *data)
return true;
#if PTMX_TIMING
- last = (struct timespec){0};
+ last = (struct timespec){};
#endif
/* Reset timers */
- struct itimerspec reset = {{0}};
+ struct itimerspec reset = {};
timerfd_settime(term->delayed_render_timer.lower_fd, 0, &reset, NULL);
timerfd_settime(term->delayed_render_timer.upper_fd, 0, &reset, NULL);
term->delayed_render_timer.is_armed = false;
@@ -1502,7 +1502,7 @@ cursor_blink_start_timer(struct terminal *term)
static bool
cursor_blink_stop_timer(struct terminal *term)
{
- return timerfd_settime(term->cursor_blink.fd, 0, &(struct itimerspec){{0}}, NULL) == 0;
+ return timerfd_settime(term->cursor_blink.fd, 0, &(struct itimerspec){}, NULL) == 0;
}
void
@@ -2069,10 +2069,10 @@ term_enable_app_sync_updates(struct terminal *term)
/* Disarm delayed rendering timers */
timerfd_settime(
term->delayed_render_timer.lower_fd, 0,
- &(struct itimerspec){{0}}, NULL);
+ &(struct itimerspec){}, NULL);
timerfd_settime(
term->delayed_render_timer.upper_fd, 0,
- &(struct itimerspec){{0}}, NULL);
+ &(struct itimerspec){}, NULL);
term->delayed_render_timer.is_armed = false;
}
@@ -2089,7 +2089,7 @@ term_disable_app_sync_updates(struct terminal *term)
/* Reset timers */
timerfd_settime(
term->render.app_sync_updates.timer_fd, 0,
- &(struct itimerspec){{0}}, NULL);
+ &(struct itimerspec){}, NULL);
}
static inline void