diff options
author | Werner Koch <wk@gnupg.org> | 2014-03-07 09:46:44 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-03-07 19:00:31 +0100 |
commit | 35266076e3452590931e58f188815859dff6de3c (patch) | |
tree | 10eabff4d3dad9f7db320b0bac245ba7a9fd5bb0 /dirmngr | |
parent | Use attribute __gnu_printf__ also in estream header files. (diff) | |
download | gnupg2-35266076e3452590931e58f188815859dff6de3c.tar.xz gnupg2-35266076e3452590931e58f188815859dff6de3c.zip |
dirmngr: Simplify strtok macro.
* dirmngr/ldap-url.c (ldap_utf8_strtok): Remove unused r3d arg.
(ldap_str2charray): Remove lasts.
--
I have no clue why an utf8 version was planned to be used. Do the
LDAP folks really assume that eventually non-ascii delimiters might be
used? Simplified it to silence the warning about an used helper var.
Diffstat (limited to 'dirmngr')
-rw-r--r-- | dirmngr/ldap-url.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dirmngr/ldap-url.c b/dirmngr/ldap-url.c index e5a7d942e..8308514d6 100644 --- a/dirmngr/ldap-url.c +++ b/dirmngr/ldap-url.c @@ -91,7 +91,7 @@ software is provided `'as is'' without express or implied warranty. */ #define LDAP_MALLOC malloc #define LDAP_REALLOC realloc #define ldap_utf8_strchr strchr -#define ldap_utf8_strtok(n,d,s) strtok (n,d) +#define ldap_utf8_strtok(n,d) strtok (n,d) #define Debug(a,b,c,d,e) void ldap_pvt_hex_unescape( char *s ); @@ -267,7 +267,6 @@ ldap_str2charray( const char *str_in, const char *brkstr ) { char **res; char *str, *s; - char *lasts; int i; /* protect the input string from strtok */ @@ -292,9 +291,9 @@ ldap_str2charray( const char *str_in, const char *brkstr ) i = 0; - for ( s = ldap_utf8_strtok( str, brkstr, &lasts ); + for ( s = ldap_utf8_strtok( str, brkstr); s != NULL; - s = ldap_utf8_strtok( NULL, brkstr, &lasts ) ) + s = ldap_utf8_strtok( NULL, brkstr) ) { res[i] = LDAP_STRDUP( s ); |