comparison src/eldap.c @ 304:c6de09ad3017 r21-0b50

Import from CVS: tag r21-0b50
author cvs
date Mon, 13 Aug 2007 10:41:12 +0200
parents 70ad99077275
children 03446687b7cc
comparison
equal deleted inserted replaced
303:d02ffe1d75ed 304:c6de09ad3017
425 { 425 {
426 base = Vldap_default_base; 426 base = Vldap_default_base;
427 } 427 }
428 if (!NILP (base)) 428 if (!NILP (base))
429 { 429 {
430 CHECK_STRING (Vldap_default_base); 430 CHECK_STRING (base);
431 } 431 }
432 432
433 /* Search scope */ 433 /* Search scope */
434 if (!NILP (scope)) 434 if (!NILP (scope))
435 { 435 {
454 { 454 {
455 Lisp_Object current = XCAR (attrs); 455 Lisp_Object current = XCAR (attrs);
456 CHECK_STRING (current); 456 CHECK_STRING (current);
457 ldap_attributes[i] = 457 ldap_attributes[i] =
458 alloca_array (char, 1 + XSTRING_LENGTH (current)); 458 alloca_array (char, 1 + XSTRING_LENGTH (current));
459 /* XSTRING_LENGTH is increased by one in order to copy the final 0 */
459 memcpy (ldap_attributes[i], 460 memcpy (ldap_attributes[i],
460 XSTRING_DATA (current), XSTRING_LENGTH (current)); 461 XSTRING_DATA (current), 1 + XSTRING_LENGTH (current));
461 ++i; 462 ++i;
462 } 463 }
463 ldap_attributes[i] = NULL; 464 ldap_attributes[i] = NULL;
464 } 465 }
465 466