From a363cb9b9111aed22d105adb0e7a8e9caab9bbe3 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 17 Feb 2013 09:01:46 +0100 Subject: Fix braces in if-else statements From the Linux kernel coding guidelines: Do not unnecessarily use braces where a single statement will do. [...] This does not apply if one branch of a conditional statement is a single statement. Use braces in both branches. Signed-off-by: Lukas Fleischer --- src/apoint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index 820b7ca..889c371 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -117,16 +117,16 @@ void apoint_sec2str(struct apoint *o, long day, char *start, char *end) struct tm lt; time_t t; - if (o->start < day) + if (o->start < day) { strncpy(start, "..:..", 6); - else { + } else { t = o->start; localtime_r(&t, <); snprintf(start, HRMIN_SIZE, "%02u:%02u", lt.tm_hour, lt.tm_min); } - if (o->start + o->dur > day + DAYINSEC) + if (o->start + o->dur > day + DAYINSEC) { strncpy(end, "..:..", 6); - else { + } else { t = o->start + o->dur; localtime_r(&t, <); snprintf(end, HRMIN_SIZE, "%02u:%02u", lt.tm_hour, lt.tm_min); -- cgit v1.2.3