From e64bc7cde6bf30b0bfa4e562b3d00a598771522f Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 14 Oct 2014 15:43:25 +0200 Subject: OS400: fix bugs in curl_*escape_ccsid() and reduce variables scope --- packages/OS400/os400sys.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'packages/OS400/os400sys.c') diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c index c67f9c92e..caeaa9559 100644 --- a/packages/OS400/os400sys.c +++ b/packages/OS400/os400sys.c @@ -94,11 +94,9 @@ static void thdbufdestroy(void * private) { - localkey_t i; - buffer_t * p; - if(private) { - p = (buffer_t *) private; + buffer_t * p = (buffer_t *) private; + localkey_t i; for(i = (localkey_t) 0; i < LK_LAST; i++) { if(p->buf) @@ -1095,14 +1093,13 @@ struct berval * * Curl_ldap_get_values_len_a(void * ld, LDAPMessage * entry, const char * attr) { - int i; char * cp; struct berval * * result; cp = (char *) NULL; if(attr) { - i = strlen(attr); + int i = strlen(attr); if(!(cp = malloc(i + 1))) { ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL, -- cgit v1.2.1