From: Piotr Gregor Date: Sat, 20 Feb 2016 18:02:16 +0000 (+0000) Subject: FS-8852 change stop condition in for loop X-Git-Tag: v1.6.7~2^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e8d315178b66cc97f9afffb4168678b25431e2b;p=thirdparty%2Ffreeswitch.git FS-8852 change stop condition in for loop Now we use predefined table length instead of hardcoded computation in stop condition of for loop. --- diff --git a/src/mod/applications/mod_avmd/fast_acosf.c b/src/mod/applications/mod_avmd/fast_acosf.c index 263b488076..6c990d2520 100644 --- a/src/mod/applications/mod_avmd/fast_acosf.c +++ b/src/mod/applications/mod_avmd/fast_acosf.c @@ -29,7 +29,7 @@ #define VARIA_DATA_MASK (0x87FFFFF8) #define CONST_DATA_MASK (0x38000000) -#define ACOS_TABLE_LENGTH (1<<25) +#define ACOS_TABLE_LENGTH (1 << 25) #define ACOS_TABLE_FILENAME "/tmp/acos_table.dat" typedef union { @@ -65,7 +65,7 @@ extern void compute_table(void) acos_table_file = fopen(ACOS_TABLE_FILENAME, "w"); - for (i = 0; i < (1 << 25); i++) { + for (i = 0; i < ACOS_TABLE_LENGTH; i++) { f = acosf(float_from_index(i)); ret = fwrite(&f, sizeof(f), 1, acos_table_file); assert(ret != 0);