]> git.sur5r.net Git - i3/i3/blobdiff - libi3/mkdirp.c
Merge pull request #3451 from orestisf1993/tray
[i3/i3] / libi3 / mkdirp.c
index c64b80a3352b97de1ac5e1ec6f21558812e668b7..f5281bd74164c5e1268a2cd3f3925ff1a9d28063 100644 (file)
@@ -1,4 +1,12 @@
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ */
 #include "libi3.h"
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
@@ -36,10 +44,7 @@ int mkdirp(const char *path, mode_t mode) {
 
     char *sep = strrchr(copy, '/');
     if (sep == NULL) {
-        if (copy != NULL) {
-            free(copy);
-            copy = NULL;
-        }
+        free(copy);
         return -1;
     }
     *sep = '\0';