aboutsummaryrefslogtreecommitdiff
path: root/packages/OS400/os400sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'packages/OS400/os400sys.c')
-rw-r--r--packages/OS400/os400sys.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c
index 84bc10abd..67b34a84c 100644
--- a/packages/OS400/os400sys.c
+++ b/packages/OS400/os400sys.c
@@ -268,13 +268,9 @@ Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
int flags)
{
- char * enodename;
- char * eservname;
+ char *enodename = NULL;
+ char *eservname = NULL;
int status;
- int i;
-
- enodename = (char *) NULL;
- eservname = (char *) NULL;
if(nodename && nodenamelen) {
enodename = malloc(nodenamelen);
@@ -294,6 +290,7 @@ Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
eservname, servnamelen, flags);
if(!status) {
+ int i;
if(enodename) {
i = QadrtConvertE2A(nodename, enodename,
nodenamelen - 1, strlen(enodename));
@@ -766,16 +763,13 @@ static int
Curl_gss_convert_in_place(OM_uint32 * minor_status, gss_buffer_t buf)
{
- unsigned int i;
- char * t;
+ unsigned int i = buf->length;
/* Convert `buf' in place, from EBCDIC to ASCII.
If error, release the buffer and return -1. Else return 0. */
- i = buf->length;
-
if(i) {
- t = malloc(i);
+ char *t = malloc(i);
if(!t) {
gss_release_buffer(minor_status, buf);
@@ -865,7 +859,6 @@ Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
{
int rc;
- unsigned int i;
gss_buffer_desc in;
gss_buffer_t inp;
@@ -874,7 +867,7 @@ Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
if(inp) {
if(inp->length && inp->value) {
- i = inp->length;
+ unsigned int i = inp->length;
in.value = malloc(i + 1);
if(!in.value) {