Re: [cdesktopenv-devel] dtinfo on OpenBSD

2012-08-11 Thread Jon Trulson
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)

Re: [cdesktopenv-devel] dtinfo on OpenBSD

2012-08-11 Thread Jon Trulson
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. -

Re: [cdesktopenv-devel] dtinfo on OpenBSD

2012-08-11 Thread Pascal Stumpf
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 **) >

Re: [cdesktopenv-devel] dtinfo on OpenBSD

2012-08-11 Thread Marc Balmer
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