aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-14 20:56:50 -0400
committerGitHub <noreply@github.com>2018-09-14 20:56:50 -0400
commitb4d60da8568c59e6aaf8995d737d587da88c2cbf (patch)
tree1f71cb868579ee7b0331435eee4f62592f9ab9d8 /swaybar
parent7699c5444c32289a22ce2c57d1daadabed87e7ac (diff)
parent73aab86b6d51b57d0426c5b81e36adfee6611ef1 (diff)
Merge branch 'master' into wlroots-1243
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/i3bar.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index 1345ee9b..0becae5d 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -8,22 +8,19 @@
#include "swaybar/config.h"
#include "swaybar/status_line.h"
-static void i3bar_block_free(struct i3bar_block *block) {
- if (!block) {
+void i3bar_block_unref(struct i3bar_block *block) {
+ if (block == NULL) {
return;
}
- free(block->full_text);
- free(block->short_text);
- free(block->align);
- free(block->name);
- free(block->instance);
- free(block->color);
- free(block);
-}
-void i3bar_block_unref(struct i3bar_block *block) {
if (--block->ref_count == 0) {
- i3bar_block_free(block);
+ free(block->full_text);
+ free(block->short_text);
+ free(block->align);
+ free(block->name);
+ free(block->instance);
+ free(block->color);
+ free(block);
}
}