@@ -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
@@ -290,7 +288,6 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
290
288
}
291
289
292
290
if (win_proxy != NULL ) {
293
- wchar_t * context = NULL ;
294
291
int defport = 0 ;
295
292
int nr_elems = 0 ;
296
293
@@ -314,27 +311,28 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
314
311
nr_elems = createProxyList (win_proxy , lpProto , & head );
315
312
if (nr_elems != 0 && head != NULL ) {
316
313
int index = 0 ;
314
+ list_item * current = head ;
317
315
proxy_array = (* env )-> NewObjectArray (env , nr_elems , proxy_class , NULL );
318
316
if (proxy_array == NULL || (* env )-> ExceptionCheck (env )) {
319
317
goto noproxy ;
320
318
}
321
- while (head != NULL && index < nr_elems ) {
319
+ while (current != NULL && index < nr_elems ) {
322
320
jstring jhost ;
323
321
jobject isa ;
324
322
jobject proxy ;
325
323
326
- if (head -> host != NULL && proxy_array != NULL ) {
324
+ if (current -> host != NULL && proxy_array != NULL ) {
327
325
/* Let's create the appropriate Proxy object then. */
328
- if (head -> port == 0 ) {
329
- head -> port = defport ;
326
+ if (current -> port == 0 ) {
327
+ current -> port = defport ;
330
328
}
331
- jhost = (* env )-> NewString (env , head -> host , (jsize )wcslen (head -> host ));
329
+ jhost = (* env )-> NewString (env , current -> host , (jsize )wcslen (current -> host ));
332
330
if (jhost == NULL || (* env )-> ExceptionCheck (env )) {
333
331
proxy_array = NULL ;
334
332
}
335
333
isa = (* env )-> CallStaticObjectMethod (env , isaddr_class ,
336
334
isaddr_createUnresolvedID , jhost ,
337
- head -> port );
335
+ current -> port );
338
336
if (isa == NULL || (* env )-> ExceptionCheck (env )) {
339
337
proxy_array = NULL ;
340
338
}
@@ -348,7 +346,7 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
348
346
}
349
347
index ++ ;
350
348
}
351
- head = head -> next ;
349
+ current = current -> next ;
352
350
}
353
351
}
354
352
}
0 commit comments