tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Make(1) patch



On Mon, Feb 09, 2009 at 09:47:20PM +0100, Reinoud Zandijk wrote:
> @@ -130,7 +126,7 @@ Buf_AddBytes(Buffer *bp, int numBytes, c
>      Byte *ptr;
>  
>      if (__predict_false(count + numBytes >= bp->size)) {
> -     bp->size += max(bp->size, numBytes + 16);
> +     bp->size += (count + numBytes - bp->size) + 16;
>       bp->buffer = bmake_realloc(bp->buffer, bp->size);
>      }
> 

If we want to go this way, write this as explicit assignment please.
E.g.
        bp->size = count + numBytes + 16;

Joerg


Home | Main Index | Thread Index | Old Index