Unified · Split
| @@ -285,8 +285,8 @@ extern "C" { · 284 unmodified lines | ||
| 285 | 285 | void tPeriodDetection_setHopSize (tPeriodDetection* const, int hs); |
| 286 | 286 | void tPeriodDetection_setWindowSize (tPeriodDetection* const, int ws); |
| 287 | 287 | void tPeriodDetection_setFidelityThreshold(tPeriodDetection* const, float threshold); |
| 288 | − void tPeriodDetection_setAlpha (tPeriodDetection* const, float alpha); | |
| 289 | − void tPeriodDetection_setTolerance (tPeriodDetection* const, float tolerance); | |
| 288 | + void tPeriodDetection_setAlpha (tPeriodDetection* const, float alpha); | |
| 289 | + void tPeriodDetection_setTolerance (tPeriodDetection* const, float tolerance); | |
| 290 | 290 | |
| 291 | 291 | //============================================================================== |
| 292 | 292 | |
| @@ -261,15 +261,15 @@ void mpool_free(char* ptr, _tMempool* pool) · 260 unmodified lines | ||
| 261 | 261 | mpool_node_t* next_node; |
| 262 | 262 | while (other_node != NULL) |
| 263 | 263 | { |
| 264 | − if ((char*)other_node < (char*)pool->head || | |
| 265 | − (char*)other_node >= ((char*)pool->head + pool->msize)) | |
| 264 | + if ((long) other_node < (long) pool->mpool || | |
| 265 | + (long) other_node >= (((long) pool->mpool) + pool->msize)) | |
| 266 | 266 | { |
| 267 | 267 | LEAF_error(2); |
| 268 | 268 | return; |
| 269 | 269 | } |
| 270 | 270 | next_node = other_node->next; |
| 271 | 271 | // Check if a node is directly after the freed node |
| 272 | − if ((long) freed_node + (leaf.header_size + freed_node->size) == (long) other_node) | |
| 272 | + if (((long) freed_node) + (leaf.header_size + freed_node->size) == (long) other_node) | |
| 273 | 273 | { |
| 274 | 274 | // Increase freed node's size |
| 275 | 275 | freed_node->size += leaf.header_size + other_node->size; |
| @@ -280,7 +280,7 @@ void mpool_free(char* ptr, _tMempool* pool) · 4 unmodified lines | ||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | // Check if a node is directly before the freed node |
| 283 | − else if ((long) other_node + (leaf.header_size + other_node->size) == (long) freed_node) | |
| 283 | + else if (((long) other_node) + (leaf.header_size + other_node->size) == (long) freed_node) | |
| 284 | 284 | { |
| 285 | 285 | // Increase the merging node's size |
| 286 | 286 | other_node->size += leaf.header_size + freed_node->size; |