On Wed, May 22, 2013 at 04:08:08PM +0900, Simon Horman wrote: > +set_tunnel_action(const struct nlattr *a, struct flow_tnl *tun_key) > +{ > + enum odp_key_fitness fitness = tun_key_from_attr(a, tun_key); > + > + memset(&tun_key, 0, sizeof tun_key); > + ovs_assert(fitness != ODP_FIT_ERROR); > +}
I don't understand the above code, at all. The memset call apparently means to zero out '*tun_key' (and throw away the conversion work we just did) but the way it's written it only zeros out the pointer to '*tun_key'. Either way, it doesn't make sense. > +enum odp_key_fitness > +tun_key_from_attr(const struct nlattr *attr, struct flow_tnl *tun); We don't put the return type on a separate line for a prototype, and the parameter names shouldn't be used in this case, please see CodingStyle. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev