Re: [Mesa-dev] [PATCH 1/2] Eliminate several cases of multiplication in arguments to calloc

2014-09-04 Thread Carl Worth
Matt Turner matts...@gmail.com writes: - configs = calloc(1, (num_modes + 1) * sizeof *configs); + configs = calloc((num_modes + 1), sizeof *configs); I'd drop the extra parentheses. Thanks for reading carefully, Matt! With that, both are Reviewed-by: Matt Turner matts...@gmail.com

[Mesa-dev] [PATCH 1/2] Eliminate several cases of multiplication in arguments to calloc

2014-09-03 Thread Carl Worth
In commit 32f2fd1c5d6088692551c80352b7d6fa35b0cd09, several calls to _mesa_calloc(x) were replaced with calls to calloc(1, x). This is strictly equivalent to what the code was doing previously. But for cases where x involves multiplication, now that we are explicitly using the two-argument

Re: [Mesa-dev] [PATCH 1/2] Eliminate several cases of multiplication in arguments to calloc

2014-09-03 Thread Matt Turner
On Wed, Sep 3, 2014 at 4:09 PM, Carl Worth cwo...@cworth.org wrote: In commit 32f2fd1c5d6088692551c80352b7d6fa35b0cd09, several calls to _mesa_calloc(x) were replaced with calls to calloc(1, x). This is strictly equivalent to what the code was doing previously. But for cases where x involves