From 8e5508953744ebcfc1ccad0a3158b91b0d071889 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Wed, 10 Jun 2009 14:13:17 -0600 Subject: [PATCH] Revert b6e691e8ac1d09df7a01c25583b785025a6212a6, fix original problem. --- src/conky.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/conky.c b/src/conky.c index 90fa2d3a..2357659c 100644 --- a/src/conky.c +++ b/src/conky.c @@ -4342,8 +4342,7 @@ static void generate_text_internal(char *p, int p_max_size, } OBJ(fs_free) { if (obj->data.fs != NULL) { - human_readable( (obj->data.fs->free ? obj->data.fs->free : - obj->data.fs->avail), p, 255); + human_readable(obj->data.fs->avail, p, 255); } } OBJ(fs_free_perc) { @@ -4351,9 +4350,7 @@ static void generate_text_internal(char *p, int p_max_size, int val = 0; if (obj->data.fs->size) { - val = (obj->data.fs->free ? obj->data.fs->free : - obj->data.fs->avail) * 100 / - obj->data.fs->size; + val = obj->data.fs->free * 100 / obj->data.fs->size; } percent_print(p, p_max_size, val); @@ -4370,8 +4367,8 @@ static void generate_text_internal(char *p, int p_max_size, } OBJ(fs_used) { if (obj->data.fs != NULL) { - human_readable(obj->data.fs->size - (obj->data.fs->free - ? obj->data.fs->free : obj->data.fs->avail), p, 255); + human_readable(obj->data.fs->size - obj->data.fs->free, p, + 255); } } OBJ(fs_bar_free) { @@ -4409,8 +4406,8 @@ static void generate_text_internal(char *p, int p_max_size, int val = 0; if (obj->data.fs->size) { - val = (obj->data.fs->free ? obj->data.fs->free : - obj->data.fs->avail) * 100 / + val = obj->data.fs->free + * 100 / obj->data.fs->size; }