summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-01-23 16:35:32 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-01-23 16:35:32 -0500
commita416715372bb51bcdc1d05426afbf5e909b5984a (patch)
tree3b5239943a68a0b74194aba4baa642236e54dc9e /sway
parents/numlen/log10/g (diff)
downloadsway-a416715372bb51bcdc1d05426afbf5e909b5984a.tar.gz
sway-a416715372bb51bcdc1d05426afbf5e909b5984a.tar.zst
sway-a416715372bb51bcdc1d05426afbf5e909b5984a.zip
Revert "s/numlen/log10/g"
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 58fc4aa5..9f6e5032 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -14,7 +14,6 @@
14#include <limits.h> 14#include <limits.h>
15#include <float.h> 15#include <float.h>
16#include <libinput.h> 16#include <libinput.h>
17#include <math.h>
18#include "stringop.h" 17#include "stringop.h"
19#include "layout.h" 18#include "layout.h"
20#include "focus.h" 19#include "focus.h"
@@ -1581,7 +1580,7 @@ static struct cmd_results *cmd_bar(int argc, char **argv) {
1581 int i; 1580 int i;
1582 for (i = 0; i < config->bars->length; ++i) { 1581 for (i = 0; i < config->bars->length; ++i) {
1583 if (bar == config->bars->items[i]) { 1582 if (bar == config->bars->items[i]) {
1584 const int len = 5 + log10(i) + 1; // "bar-" + i + \0 1583 const int len = 5 + numlen(i); // "bar-" + i + \0
1585 bar->id = malloc(len * sizeof(char)); 1584 bar->id = malloc(len * sizeof(char));
1586 snprintf(bar->id, len, "bar-%d", i); 1585 snprintf(bar->id, len, "bar-%d", i);
1587 break; 1586 break;