On Sat, 11 Aug 2012, Pascal Stumpf wrote:
> On Sat, 11 Aug 2012 13:52:08 +0200, Marc Balmer wrote:
>> Wouldn't it be better to avoid the multiplication in malloc here, too?
>>
>> i.e. instead of
>>
>>> sets = (std::ostrstream **)
>>> + malloc(sizeof(std::ostrstream *) * sets_max)
On Sat, 11 Aug 2012, Pascal Stumpf wrote:
> See patch.
>
Applied, thanks.
--
Jon Trulson
"If the Martian rope-a-dope don't get him, he'll get himself, he'll
come in too fast and punch himself out."
- one of my brothers, referring to the Curiosity landing.
-
On Sat, 11 Aug 2012 13:52:08 +0200, Marc Balmer wrote:
> Wouldn't it be better to avoid the multiplication in malloc here, too?
>
> i.e. instead of
>
> > sets = (std::ostrstream **)
> > + malloc(sizeof(std::ostrstream *) * sets_max);
>
> use
>
> > sets = (std::ostrstream **)
>
Wouldn't it be better to avoid the multiplication in malloc here, too?
i.e. instead of
> sets = (std::ostrstream **)
> + malloc(sizeof(std::ostrstream *) * sets_max);
use
> sets = (std::ostrstream **)
> + calloc(sizeof(std::ostrstream *), sets_max);
(to