]> git.sur5r.net Git - i3/i3/blobdiff - src/commands_parser.c
Merge branch 'release-4.16.1'
[i3/i3] / src / commands_parser.c
index cdd35e459b904d7241cb599eb4abb55ef0e2e271..4299c008335570ced9c8daebc12bdaa1cefd74e9 100644 (file)
@@ -1,5 +1,3 @@
-#undef I3__FILE__
-#define I3__FILE__ "commands_parser.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
@@ -25,6 +23,8 @@
  * instead of actually calling any function).
  *
  */
+#include "all.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -32,8 +32,6 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include "all.h"
-
 // Macros to make the YAJL API a bit easier to use.
 #define y(x, ...) (command_output.json_gen != NULL ? yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) : 0)
 #define ystr(str) (command_output.json_gen != NULL ? yajl_gen_string(command_output.json_gen, (unsigned char *)str, strlen(str)) : 0)
@@ -159,7 +157,7 @@ static long get_long(const char *identifier) {
 // TODO move to a common util
 static void clear_stack(void) {
     for (int c = 0; c < 10; c++) {
-        if (stack[c].type == STACK_STR && stack[c].val.str != NULL)
+        if (stack[c].type == STACK_STR)
             free(stack[c].val.str);
         stack[c].identifier = NULL;
         stack[c].val.str = NULL;