libm: Don't let Visual Studio generate an implicit memset() call.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 08 Aug 2018 15:39:20 -0400
changeset 12087cb546477e34f
parent 12086 9beb08c32d94
child 12088 399cc39583cc
libm: Don't let Visual Studio generate an implicit memset() call.
src/libm/k_rem_pio2.c
     1.1 --- a/src/libm/k_rem_pio2.c	Wed Aug 08 12:36:54 2018 -0400
     1.2 +++ b/src/libm/k_rem_pio2.c	Wed Aug 08 15:39:20 2018 -0400
     1.3 @@ -172,7 +172,9 @@
     1.4      /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
     1.5  	j = jv-jx; m = jx+jk;
     1.6  	for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];
     1.7 -	for(i=m+1;i<SDL_arraysize(f);i++) f[i] = zero;
     1.8 +	if ((m+1) < SDL_arraysize(f)) {
     1.9 +        SDL_memset(&f[m+1], 0, sizeof (f) - ((m+1) * sizeof (f[0])));
    1.10 +    }
    1.11  
    1.12      /* compute q[0],q[1],...q[jk] */
    1.13  	for (i=0;i<=jk;i++) {