On 29 January 2014 23:41, André Hentschel <nerv(a)dawncrow.de> wrote:
> - extrabuf = HeapReAlloc( GetProcessHeap(), 0, extrabuf, ebufsize ) ;
> + if (newbuf = HeapReAlloc( GetProcessHeap(), 0, extrabuf, ebufsize ))
> + extrabuf = newbuf;
> + else
> + break;
This will introduce a warning:
computername.c: In function ‘dns_gethostbyname’:
computername.c:90:9: warning: suggest parentheses around
assignment used as truth value [-Wparentheses]
I happen to think
+ if (!(newbuf = HeapReAlloc( GetProcessHeap(), 0, extrabuf, ebufsize )))
+ break;
+ extrabuf = newbuf;
would be slightly nicer anyway.