On Fri, Jan 17, 2014 at 01:22:39PM -0800, Gurucharan Shetty wrote: > On Fri, Jan 17, 2014 at 1:07 PM, Ben Pfaff <b...@nicira.com> wrote: > > On Fri, Jan 17, 2014 at 12:26:21PM -0800, Gurucharan Shetty wrote: > >> More users will be added in an upcoming commit. > >> > >> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com> > > > > Why doesn't ovs_lasterror_to_string() take an appropriate type? (Why > > does the only user need a cast to pass the argument?) > I don'y see any reason for the cast. I suppose you mean > ovs_lasterror_to_string() could have taken LPVOID as an argument, > correct?
I mean, FormatMessage() must be storing a pointer to a character string in msg_buf, because msg_buf is used as a char * in the call to VLOG_ERR, so I would expect that the appropriate type for msg_buf is 'char *' and that, thus, ovs_lasterror_to_string()'s parameter should have type 'char **'. (To me, it looks totally weird to define msg_buf as any kind of void pointer, because FormatMessage() doesn't expect that, hence the need for a cast.) > If so, I will change it during the re-spin after I get comments for patch 3. OK. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev