home · contact · privacy
Enforce C11 via Makefile, explicate POSIX dependencies in source files.
[plomrogue] / src / client / windows.c
index c08ada265a56d596a174decd5bb71250e6843839..e84d652554c74ba12face4114501818193f500ad 100644 (file)
@@ -1,5 +1,6 @@
 /* src/client/windows.c */
 
+#define _POSIX_C_SOURCE 200809L /* strnlen() */
 #include "windows.h"
 #include <ncurses.h> /* chtype, getmaxx(), getmaxy(), erase(), werase(),
                       * endwin(), delwin(), wnoutrefresh(), pnoutrefresh(),
@@ -550,8 +551,8 @@ extern void free_winDB()
         free(wc->kb.kbs);
         wc->kb.kbs = NULL;
     }
-    free(world.winDB.ids);  /* NULL this too since add_win_to_winDB() checks  */
-    world.winDB.ids = NULL; /* for it to detect its first post-DB-purge round.*/
+    free(world.winDB.ids); /* NULL this since read_winconf_from_file() checks */
+    world.winDB.ids = NULL;/* for it to detect its first post-DB-purge round. */
     free(world.winDB.wins);
     free(world.winDB.order);
 }