X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3bar%2Finclude%2Futil.h;h=1f56361106dfc97670bc412bf5d6e2ad90fb6450;hb=HEAD;hp=dfbfd6bfd3c07f1756e33470e24c1dc506880746;hpb=3853d1866be47f2fd575e970a12a985c45ac532d;p=i3%2Fi3 diff --git a/i3bar/include/util.h b/i3bar/include/util.h index dfbfd6bf..1f563611 100644 --- a/i3bar/include/util.h +++ b/i3bar/include/util.h @@ -7,6 +7,8 @@ */ #pragma once +#include + #include "queue.h" /* Get the maximum/minimum of x and y */ @@ -18,12 +20,10 @@ #define STARTS_WITH(string, len, needle) (((len) >= strlen((needle))) && strncasecmp((string), (needle), strlen((needle))) == 0) /* Securely free p */ -#define FREE(p) \ - do { \ - if (p != NULL) { \ - free(p); \ - p = NULL; \ - } \ +#define FREE(p) \ + do { \ + free(p); \ + p = NULL; \ } while (0) /* Securely free single-linked list */