@@ -104,7 +104,6 @@ static int createProxyList(LPWSTR win_proxy, const WCHAR *pproto, list_item **he
104
104
int nr_elems = 0 ;
105
105
wchar_t * context = NULL ;
106
106
wchar_t * current_proxy = NULL ;
107
- BOOL error = FALSE;
108
107
109
108
/*
110
109
* The proxy server list contains one or more of the following strings
@@ -116,7 +115,6 @@ static int createProxyList(LPWSTR win_proxy, const WCHAR *pproto, list_item **he
116
115
LPWSTR pport ;
117
116
LPWSTR phost ;
118
117
int portVal = 0 ;
119
- wchar_t * next_proxy = NULL ;
120
118
list_item * proxy = NULL ;
121
119
wchar_t * pos = NULL ;
122
120
@@ -292,7 +290,6 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
292
290
}
293
291
294
292
if (win_proxy != NULL ) {
295
- wchar_t * context = NULL ;
296
293
int defport = 0 ;
297
294
int nr_elems = 0 ;
298
295
@@ -315,27 +312,28 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
315
312
nr_elems = createProxyList (win_proxy , lpProto , & head );
316
313
if (nr_elems != 0 && head != NULL ) {
317
314
int index = 0 ;
315
+ list_item * current = head ;
318
316
proxy_array = (* env )-> NewObjectArray (env , nr_elems , proxy_class , NULL );
319
317
if (proxy_array == NULL || (* env )-> ExceptionCheck (env )) {
320
318
goto noproxy ;
321
319
}
322
- while (head != NULL && index < nr_elems ) {
320
+ while (current != NULL && index < nr_elems ) {
323
321
jstring jhost ;
324
322
jobject isa ;
325
323
jobject proxy ;
326
324
327
- if (head -> host != NULL && proxy_array != NULL ) {
325
+ if (current -> host != NULL && proxy_array != NULL ) {
328
326
/* Let's create the appropriate Proxy object then. */
329
- if (head -> port == 0 ) {
330
- head -> port = defport ;
327
+ if (current -> port == 0 ) {
328
+ current -> port = defport ;
331
329
}
332
- jhost = (* env )-> NewString (env , head -> host , (jsize )wcslen (head -> host ));
330
+ jhost = (* env )-> NewString (env , current -> host , (jsize )wcslen (current -> host ));
333
331
if (jhost == NULL || (* env )-> ExceptionCheck (env )) {
334
332
proxy_array = NULL ;
335
333
}
336
334
isa = (* env )-> CallStaticObjectMethod (env , isaddr_class ,
337
335
isaddr_createUnresolvedID , jhost ,
338
- head -> port );
336
+ current -> port );
339
337
if (isa == NULL || (* env )-> ExceptionCheck (env )) {
340
338
proxy_array = NULL ;
341
339
}
@@ -349,7 +347,7 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
349
347
}
350
348
index ++ ;
351
349
}
352
- head = head -> next ;
350
+ current = current -> next ;
353
351
}
354
352
}
355
353
}
0 commit comments