[ofa-general] [PATCH 1/4] multicast multiplexing - definitions for new data types, and infrastructure functions

Sasha Khapyorsky sashak at voltaire.com
Sun Jul 19 08:15:27 PDT 2009


On 09:38 Thu 16 Jul     , Hal Rosenstock wrote:
> > +static osm_mgrp_port_t *osm_mgrp_port_new(ib_net64_t port_guid)
> > +{
> > + ?? ?? ?? osm_mgrp_port_t *p_mgrp_port =
> > + ?? ?? ?? ?? ?? (osm_mgrp_port_t *) malloc(sizeof(osm_mgrp_port_t));
> > + ?? ?? ?? if (!p_mgrp_port) {
> > + ?? ?? ?? ?? ?? ?? ?? return NULL;
> > + ?? ?? ?? }
> > + ?? ?? ?? memset(p_mgrp_port, 0, sizeof(*p_mgrp_port));
> 
> Minor - could use calloc rather than malloc/memset here.

BTW what is the clear benefit?

Sasha



More information about the general mailing list