Re: [exim] [BUG?] in src/auths/pwcheck.c

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Lightfoot
Date:  
À: Peter D. Gray
CC: exim-users
Sujet: Re: [exim] [BUG?] in src/auths/pwcheck.c
On Fri, Oct 06, 2006 at 09:52:05AM +1000, Peter D. Gray wrote:
> On Fri, Oct 06, 2006 at 12:32:33AM +0100, Chris Lightfoot wrote:
> > On Thu, Oct 05, 2006 at 02:28:49PM +0100, Philip Hazel wrote:
> > the struct is all-bits-zero. That's not necessarily true
> > (by which I mean, it's almost certainly true on every
> > platform where exim runs, but the C and POSIX standards
> > don't require that that be so). The ugly but proper way to
> > do that is,
> >
> >     const struct mime_part mimez = {0};
> >         /* ... */
> >     mime_part_p = mimez;

> >
> > but only nutters like me actually bother to write their
> > code this way....
> >
>
> Errrr... what about malloced structures???


struct whatever *w, wz = {0};
if (!(w = malloc(sizeof *w)))
    /* handle error */
*w = wz;


--
Plane Too Close to Ground, Crash Probe Told (newspaper headline)