diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 6 | ||||
-rw-r--r-- | sway/config.c | 4 | ||||
-rw-r--r-- | sway/input/input-manager.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sway/commands.c b/sway/commands.c index 927434bc..cd595b03 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -236,15 +236,15 @@ list_t *execute_command(char *_exec, struct sway_seat *seat, | |||
236 | criteria_destroy(criteria); | 236 | criteria_destroy(criteria); |
237 | config->handler_context.using_criteria = true; | 237 | config->handler_context.using_criteria = true; |
238 | // Skip leading whitespace | 238 | // Skip leading whitespace |
239 | head += strspn(head, whitespace); | 239 | for (; isspace(*head); ++head) {} |
240 | } | 240 | } |
241 | // Split command list | 241 | // Split command list |
242 | cmdlist = argsep(&head, ";"); | 242 | cmdlist = argsep(&head, ";"); |
243 | cmdlist += strspn(cmdlist, whitespace); | 243 | for (; isspace(*cmdlist); ++cmdlist) {} |
244 | do { | 244 | do { |
245 | // Split commands | 245 | // Split commands |
246 | cmd = argsep(&cmdlist, ","); | 246 | cmd = argsep(&cmdlist, ","); |
247 | cmd += strspn(cmd, whitespace); | 247 | for (; isspace(*cmd); ++cmd) {} |
248 | if (strcmp(cmd, "") == 0) { | 248 | if (strcmp(cmd, "") == 0) { |
249 | wlr_log(WLR_INFO, "Ignoring empty command."); | 249 | wlr_log(WLR_INFO, "Ignoring empty command."); |
250 | continue; | 250 | continue; |
diff --git a/sway/config.c b/sway/config.c index bb7f796d..c71f315a 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -580,7 +580,7 @@ static int detect_brace_on_following_line(FILE *file, char *line, | |||
580 | free(peeked); | 580 | free(peeked); |
581 | peeked = peek_line(file, lines, &position); | 581 | peeked = peek_line(file, lines, &position); |
582 | if (peeked) { | 582 | if (peeked) { |
583 | peeked = strip_whitespace(peeked); | 583 | strip_whitespace(peeked); |
584 | } | 584 | } |
585 | lines++; | 585 | lines++; |
586 | } while (peeked && strlen(peeked) == 0); | 586 | } while (peeked && strlen(peeked) == 0); |
@@ -663,7 +663,7 @@ bool read_config(FILE *file, struct sway_config *config, | |||
663 | read += length + 1; | 663 | read += length + 1; |
664 | } | 664 | } |
665 | 665 | ||
666 | line = strip_whitespace(line); | 666 | strip_whitespace(line); |
667 | if (line[0] == '#') { | 667 | if (line[0] == '#') { |
668 | free(line); | 668 | free(line); |
669 | continue; | 669 | continue; |
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 61087733..04e14355 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c | |||
@@ -49,7 +49,7 @@ char *input_device_get_identifier(struct wlr_input_device *device) { | |||
49 | int vendor = device->vendor; | 49 | int vendor = device->vendor; |
50 | int product = device->product; | 50 | int product = device->product; |
51 | char *name = strdup(device->name); | 51 | char *name = strdup(device->name); |
52 | name = strip_whitespace(name); | 52 | strip_whitespace(name); |
53 | 53 | ||
54 | char *p = name; | 54 | char *p = name; |
55 | for (; *p; ++p) { | 55 | for (; *p; ++p) { |