[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: cmd: Avoid mixing signed and unsigned type in conditional
From: Frédéric Delanoy <frederic.delanoy () gmail ! com>
Date: 2011-10-28 22:51:20
Message-ID: CAE4k4eua707p-F7YnYoZgmq95mQ+k1ZE6bQNg5vFj+=xwT2RpA () mail ! gmail ! com
[Download RAW message or body]
2011/10/27 Michael Stefaniuc <mstefani@redhat.com>:
> On 10/27/2011 02:09 PM, Frédéric Delanoy wrote:
>> On Thu, Oct 27, 2011 at 08:38, Eric Pouech <eric.pouech@orange.fr> wrote:
>>> why do we check for ptr being null or not, when we deref ptr one line above?
>>
>>>> if (*ptr == '\n') ptr++;
>>>> - WCMD_output_asis_len(message, (ptr) ? ptr - message :
>>>> strlenW(message), handle);
>>>> + WCMD_output_asis_len(message, (ptr) ? (DWORD)(ptr - message) :
>>>> strlenW(message), handle);
>>>> if (ptr) {
>>>> numChars = 0;
>>>> if (++line_count >= max_height - 1) {
>>
>> It's dereferenced but incremented afterwards, so might be null after that line
> Only if ptr wraps around ;)
Yeah right. Don't know where I saw a * before the ptr in (ptr)...
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic