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