At a very quick glance - yes, that does look odd and quite possibly wrong.
On Sat, Apr 8, 2017 at 5:44 PM, David A.D. Morano, PE, PhD < mor...@computer.org> wrote: > Hello All, > > > https://github.com/att/ast/blob/master/src/lib/libast/ > vmalloc/vmopen.c#L56 > > Vmalloc_t* vmopen(Vmdisc_t* disc, Vmethod_t* meth, int mode) > > > > Looks ok to me. > > Thanks very much for the responses. > > Sorry about my mistake in incorrectly stating that |vmopen()| took a > pointer to a Vmalloc_t as its first argument. It indeed takes a pointer > to a Vmdisc_t as shown above. (As as aside, the subroutine |_vmopen()| > does take a pointer to a Vmalloc_t object.) > > But it does look confusing because although |vmopen()| takes a pointer to > a Vmdisc_t as its first argument, it is being passed in the code (in > question), a pointer-to-a-pointer to a Vmdisc_t object, rather than just > a pointer to a Vmdisc_t object. That seems a bit confusing. > > I would have thought that the |vmopen()| call in the code > should have looked like: > > vmopen(vmdisc,Vmlast,0) > > rather than: > > vmopen(&vmdisc,Vmlast,0) > > as is in the existing code. > > Thanks to all those who pointed out that the existing code is correct. > > ---- > David A.D. Morano > mor...@computer.org > > _______________________________________________ > ast-users mailing list > ast-users@lists.research.att.com > http://lists.research.att.com/mailman/listinfo/ast-users >
_______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users