about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-08-23 13:48:42 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-08-23 13:48:42 +0200
commitdf1b19ecec7f94608fba2c0d5e15a1e9ed16a6ac (patch)
tree62da5a31c79cbc4d0a4d7821df097a15a9e593b3
parent8a04496c7937c3702f25024a949cc7b09289aa9e (diff)
downloadprofani-tty-df1b19ecec7f94608fba2c0d5e15a1e9ed16a6ac.tar.gz
Reformat color.c
-rw-r--r--src/config/color.c12
1 files 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 */