From e95b138e62fed30cd3f2d9013cd557ac60ff5237 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Wed, 4 Mar 2015 16:23:04 +0200 Subject: [PATCH] Rename struct strategy_list to strategy_list_t. --- src/strategyselector.c | 8 ++++---- src/strategyselector.h | 2 +- tests/test_strategies.c | 2 +- tests/test_strategies.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/strategyselector.c b/src/strategyselector.c index 7493e462..5545899b 100644 --- a/src/strategyselector.c +++ b/src/strategyselector.c @@ -34,14 +34,14 @@ hardware_flags g_hardware_flags; static void set_hardware_flags(int32_t cpuid); -static void* strategyselector_choose_for(const strategy_list * const strategies, const char * const strategy_type); +static void* strategyselector_choose_for(const strategy_list_t * const strategies, const char * const strategy_type); //Strategies to include (add new file here) //Returns 1 if successful int strategyselector_init(int32_t cpuid) { const strategy_to_select *cur_strategy_to_select = strategies_to_select; - strategy_list strategies; + strategy_list_t strategies; strategies.allocated = 0; strategies.count = 0; @@ -94,7 +94,7 @@ void strategyselector_free() { //Returns 1 if successful, 0 otherwise int strategyselector_register(void * const opaque, const char * const type, const char * const strategy_name, int priority, void * const fptr) { - strategy_list * const strategies = opaque; + strategy_list_t * const strategies = opaque; if (strategies->allocated == strategies->count) { strategy_t* new_strategies = realloc(strategies->strategies, sizeof(strategy_t) * (strategies->allocated + STRATEGY_LIST_ALLOC_SIZE)); @@ -120,7 +120,7 @@ int strategyselector_register(void * const opaque, const char * const type, cons return 1; } -static void* strategyselector_choose_for(const strategy_list * const strategies, const char * const strategy_type) { +static void* strategyselector_choose_for(const strategy_list_t * const strategies, const char * const strategy_type) { unsigned int max_priority = 0; int max_priority_i = -1; char buffer[256]; diff --git a/src/strategyselector.h b/src/strategyselector.h index 4351bf1c..cb9a5f4d 100644 --- a/src/strategyselector.h +++ b/src/strategyselector.h @@ -102,7 +102,7 @@ typedef struct { unsigned int count; unsigned int allocated; strategy_t* strategies; -} strategy_list; +} strategy_list_t; #define STRATEGY_LIST_ALLOC_SIZE 16 diff --git a/tests/test_strategies.c b/tests/test_strategies.c index 4257819b..282d4081 100644 --- a/tests/test_strategies.c +++ b/tests/test_strategies.c @@ -22,7 +22,7 @@ #include "src/strategyselector.h" -strategy_list strategies; +strategy_list_t strategies; void init_test_strategies() diff --git a/tests/test_strategies.h b/tests/test_strategies.h index e74263ec..a691a7a4 100644 --- a/tests/test_strategies.h +++ b/tests/test_strategies.h @@ -22,7 +22,7 @@ #include "src/strategyselector.h" -extern strategy_list strategies; +extern strategy_list_t strategies; void init_test_strategies();