iphlpapi: Avoid sockaddr scope confusion
Alexandre Julliard
julliard at winehq.org
Wed Jan 11 14:59:57 CST 2017
Bruno Jesus <00cpxxx at gmail.com> writes:
> On Wed, Jan 11, 2017 at 6:51 PM, Alexandre Julliard <julliard at winehq.org> wrote:
>> Bruno Jesus <00cpxxx at gmail.com> writes:
>>
>>> On Wed, Jan 11, 2017 at 6:14 PM, Alexandre Julliard <julliard at winehq.org> wrote:
>>>> André Hentschel <nerv at dawncrow.de> writes:
>>>>
>>>>> Signed-off-by: André Hentschel <nerv at dawncrow.de>
>>>>> ---
>>>>> dlls/iphlpapi/iphlpapi_main.c | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> This doesn't look to me like an improvement.
>>>
>>> It is an improvement because a same name variable is declared inside a
>>> for [2] lines below this one. So reducing the scope will make the
>>> variables no longer overlap.
>>
>> It's a different scope, they already don't overlap. It's done the same
>> way as the v4 case above it.
>
> You are right, they are not in the same scope. Yet it is not exactly
> like ipv4 case. Line 1116 declares the prefix and line 1122 the sa,
> while in the ipv6 case both variables are declared in 1078. The change
> makes the code look more similar by declaring the ipv6 sa inside the
> for just like the ipv4.
The ipv6 code starting at line 1078 is a copy of the ipv4 code starting
at line 1047. In both cases the variable is in the larger scope, which
works just as well.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list