Diff for /libraries/liblber/encode.c between versions 1.49 and 1.50

version 1.49, 2002/01/14 00:43:18 version 1.50, 2002/02/13 20:26:24
Line 1 Line 1
 /* Encode.c - ber output encoding routines */  /* Encode.c - ber output encoding routines */
 /* $OpenLDAP: pkg/ldap/libraries/liblber/encode.c,v 1.48 2002/01/05 17:54:05 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/liblber/encode.c,v 1.49 2002/01/14 00:43:18 hyc Exp $ */
 /*  /*
  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.   * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
Line 403  ber_put_boolean( Line 403  ber_put_boolean(
         ber_tag_t tag )          ber_tag_t tag )
 {  {
         ber_len_t               taglen;          ber_len_t               taglen;
         unsigned char   trueval = (unsigned char) -1;          unsigned char   c;
         unsigned char   falseval = 0;  
   
         assert( ber != NULL );          assert( ber != NULL );
         assert( LBER_VALID( ber ) );          assert( LBER_VALID( ber ) );
Line 420  ber_put_boolean( Line 419  ber_put_boolean(
                 return -1;                  return -1;
         }          }
   
         if ( ber_write( ber, (char *)(boolval ? &trueval : &falseval), 1, 0 )          c = boolval ? (unsigned char) ~0U : (unsigned char) 0U;
   
           if ( ber_write( ber, (char *) &c, 1, 0 )
                 != 1 )                  != 1 )
         {          {
                 return -1;                  return -1;

Removed from v.1.49  
changed lines
  Added in v.1.50


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org