[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kabc/plugins/ldap
From: Helge Deller <deller () kde ! org>
Date: 2003-04-13 19:06:14
[Download RAW message or body]
CVS commit by deller:
typo fix and small optimization
M +5 -4 resourceldap.cpp 1.24
--- kdelibs/kabc/plugins/ldap/resourceldap.cpp #1.23:1.24
@@ -66,5 +66,5 @@ ResourceLDAP::ResourceLDAP( const KConfi
If you want to add new attributes, append them here, add a
translation string in the ctor of AttributesDialog and
- handel them in the load() method below.
+ handle them in the load() method below.
These are the default values from
*/
@@ -179,7 +179,8 @@ bool ResourceLDAP::load()
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
if ( !it.data().isEmpty() ) {
- LdapSearchAttr[ i ] = new char[ it.data().utf8().length() + 1 ];
- memset( LdapSearchAttr[ i ], 0, it.data().utf8().length() + 1 );
- memcpy( LdapSearchAttr[ i ], it.data().utf8(), it.data().utf8().length() );
+ unsigned int len = it.data().utf8().length();
+ LdapSearchAttr[ i ] = new char[ len+1 ];
+ memcpy( LdapSearchAttr[ i ], it.data().utf8(), len );
+ LdapSearchAttr[ i ][ len ];
++i;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic