On Mon, Aug 14, 2017 at 11:19 AM, Bin Cheng <bin.ch...@arm.com> wrote: > Hi, > This simple patch adds new interface returning adjacent vertices for a vertex > in graph. > Bootstrap and test in series. Is it OK?
The comment of the function doesn't match its implementation. Why did you choose to use the dfs helpers instead of (more clearly IMHO) using e = v->succ; while (e) { adj->safe_push (e->dest); e = e->succ_next; given you do not expose the direction as arggument to adjacent_vertices? Btw, is this "adjacent" a term understood in the context of (directed) graphs? Richard. > Thanks, > bin > 2017-08-10 Bin Cheng <bin.ch...@arm.com> > > * graphds.c (adjacent_vertices): New function. > * graphds.h (adjacent_vertices): New declaration.