iphlpapi: Let C look like C.

Juan Lang juan.lang at gmail.com
Wed Feb 6 17:54:40 CST 2013


Hi Michael, this isn't actually a problem with your patch, just something I
spotted:

On Wed, Feb 6, 2013 at 3:15 PM, Michael Stefaniuc <mstefani at redhat.com>wrote:

> On 02/06/2013 11:16 PM, Austin English wrote:
> > On Feb 6, 2013 11:13 PM, "Michael Stefaniuc" <mstefani at redhat.de
> > <mailto:mstefani at redhat.de>> wrote:
> >>
> >> ---
> >>  dlls/iphlpapi/ipstats.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
> >> index f8191ba..966d24e 100644
> >> --- a/dlls/iphlpapi/ipstats.c
> >> +++ b/dlls/iphlpapi/ipstats.c
> >> @@ -693,7 +693,7 @@ DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX
> > stats, DWORD family)
> >>      }
> >>
> >>      ret = GetIcmpStatistics(&ipv4stats);
> >> -    if SUCCEEDED(ret)
> >> +    if (SUCCEEDED(ret))
>

This code is incorrect. All paths that set ret yield a non-negative value
for ret, so SUCCEEDED(ret) is always 1. Using SUCCEEDED/FAILED on something
other than an HRESULT is asking for trouble. The correct thing to do is if
(!ret).
--Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130206/de9bbfca/attachment.html>


More information about the wine-devel mailing list