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

Top Pagina
Delete this message
Reply to this message
Auteur: Chris Lightfoot
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] [BUG?] in src/auths/pwcheck.c
On Fri, Oct 06, 2006 at 09:44:04AM +0100, Philip Hazel wrote:
> On Fri, 6 Oct 2006, Chris Lightfoot wrote:

    [...]

> > pointers specifically.) Of course that assumes that the
> > appropriate zero or null value for each of the elements of
> > the struct is all-bits-zero. That's not necessarily true
>
> Indeed. I wonder if I wrote any of those? (I didn't write the one that
> you quote.) My gut feeling is that I would only do that if all the items
> in the structure were integers, but you never know. :-) ... Curiosity
> got the better of me, and I checked ... looks like the only dodgy cases
> are where I've done it for the system structs addrinfo, sockaddr, and
> stat.


(A pedant writes) the C standard of course doesn't
guarantee that the representation of zero for scalar types
is all-bits-zero either, though given the ubiquity of
memset(p, 0, sizeof *p) as an idiom a CPU designer would
have to be bonkers to design an architecture now in which
that wasn't true.

--
``Some people, when confronted with a problem, think,
`I know, I'll use regular expressions.'
Now they have two problems.'' (Jamie Zawinski)