]> err.no Git - mapper/blobdiff - src/path.h
Add header and cast properly.
[mapper] / src / path.h
index cba575b0abf962de0954c109a2011075ee0e6eff..108c25a03d27d224df914cc33139549d994b775c 100644 (file)
@@ -5,10 +5,10 @@
 #include <gtk/gtk.h>
 
 #define MACRO_PATH_INIT(path) { \
-    (path).head = (path).tail = g_new(Point, ARRAY_CHUNK_SIZE); \
+    (path).head = (path).tail = g_new0(Point, ARRAY_CHUNK_SIZE); \
     *((path).tail) = _point_null; \
     (path).cap = (path).head + ARRAY_CHUNK_SIZE; \
-    (path).whead = g_new(WayPoint, ARRAY_CHUNK_SIZE); \
+    (path).whead = g_new0(WayPoint, ARRAY_CHUNK_SIZE); \
     (path).wtail = (path).whead - 1; \
     (path).wcap = (path).whead + ARRAY_CHUNK_SIZE; \
 }