Bodo Moeller wrote:
> 
> On Fri, Jul 30, 1999 at 09:49:57AM +0100, Ben Laurie wrote:
> 
> >> I tried  a = BN_dup(b);
> >>
> >> if b is NULL, it causes error. Is this normal or should it just
> >> duplicate NULL over to a?
> 
> > It's at times like this that I wish they hadn't made && boolean.
> > Wouldn't it be cool to write:
> >
> >    a=b && BN_dup(b);
> >
> > ? (Works in Perl, BTW).
> 
> The equivalent in C is only slightly more verbose:
> 
>      a = b ? BN_dup(b) : NULL;

True, but the opposite is less satisfactory, i.e. a=b || c; where b is a
complex expression. Besides, it isn't nearly so neat.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to