Thread (1 message) 1 message, 1 author, 2018-10-13

Re: [PATCH v3 4/7] revision.c: begin refactoring --topo-order logic

From: Junio C Hamano <hidden>
Date: 2018-10-13 08:05:23

Johannes Sixt [off-list ref] writes:
Am 12.10.18 um 08:33 schrieb Junio C Hamano:
quoted
"Derrick Stolee via GitGitGadget" [off-list ref] writes:
quoted
+struct topo_walk_info {};
+
+static void init_topo_walk(struct rev_info *revs)
+{
+	struct topo_walk_info *info;
+	revs->topo_walk_info = xmalloc(sizeof(struct topo_walk_info));
+	info = revs->topo_walk_info;
+	memset(info, 0, sizeof(struct topo_walk_info));
There is no member in the struct at this point.  Are we sure this is
safe?  Just being curious.
sizeof cannot return 0. sizeof(struct topo_walk_info) will be 1 here.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help