On Sun, Jul 19, 2009 at 11:15 AM, Sasha Khapyorsky<[email protected]> wrote: > 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?
It's minor but it does save the overhead of an extra call into library. -- Hal > Sasha _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
