diff options
author | taiyu <[email protected]> | 2015-08-18 03:22:31 -0700 |
---|---|---|
committer | taiyu <[email protected]> | 2015-08-18 03:22:31 -0700 |
commit | abd0afb03a2929931cb684e5aaeac312affe6e5f (patch) | |
tree | 5c019b8f9d3285453a8fa101e0400e6c484fffc6 /sway/commands.c | |
parent | e9c3a9016f1df5877404721043967431afb2f5c7 (diff) |
enhanced whitespace remover
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index 444e6159..642fa3ce 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -490,7 +490,7 @@ static char **split_directive(char *line, int *argc) { if (!*line) return parts; int in_string = 0, in_character = 0; - int i, j, _; + int i, j; for (i = 0, j = 0; line[i]; ++i) { if (line[i] == '\\') { ++i; @@ -503,7 +503,7 @@ static char **split_directive(char *line, int *argc) { char *item = malloc(i - j + 1); strncpy(item, line + j, i - j); item[i - j] = '\0'; - item = strip_whitespace(item, &_); + strip_whitespace(item); if (item[0] == '\0') { free(item); } else { @@ -521,7 +521,7 @@ static char **split_directive(char *line, int *argc) { char *item = malloc(i - j + 1); strncpy(item, line + j, i - j); item[i - j] = '\0'; - item = strip_whitespace(item, &_); + strip_whitespace(item); if (*argc == capacity) { capacity++; parts = realloc(parts, sizeof(char *) * capacity); |