From df1b19ecec7f94608fba2c0d5e15a1e9ed16a6ac Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 23 Aug 2019 13:48:42 +0200 Subject: Reformat color.c --- src/config/color.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config/color.c b/src/config/color.c index ff0d8ca0..c386ec81 100644 --- a/src/config/color.c +++ b/src/config/color.c @@ -355,8 +355,8 @@ static int find_col(const char *col_name, int n) void color_pair_cache_reset(void) { if (cache.pairs) { - free(cache.pairs); - memset(&cache, 0, sizeof(cache)); + free(cache.pairs); + memset(&cache, 0, sizeof(cache)); } /* @@ -398,9 +398,11 @@ int color_pair_cache_get(const char *pair_name) } /* try to find pair in cache */ - for (i = 0; i < cache.size; i++) - if (fg == cache.pairs[i].fg && bg == cache.pairs[i].bg) - return i; + for (i = 0; i < cache.size; i++) { + if (fg == cache.pairs[i].fg && bg == cache.pairs[i].bg) { + return i; + } + } /* otherwise cache new pair */ -- cgit 1.4.1-2-gfad0