Skip to content

Commit

Permalink
Merge pull request #241 from paullouisageneau/remove-atomic-var-init
Browse files Browse the repository at this point in the history
Remove deprecated ATOMIC_VAR_INIT macro
  • Loading branch information
paullouisageneau authored Apr 26, 2024
2 parents ac0fc81 + 035034f commit e7eb3b9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ juice_agent_t *agent_create(const juice_config_t *config) {

agent->state = JUICE_STATE_DISCONNECTED;
agent->mode = AGENT_MODE_UNKNOWN;
agent->selected_entry = ATOMIC_VAR_INIT(NULL);
agent->selected_entry = NULL;

agent->conn_index = -1;
agent->conn_impl = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const char *log_level_colors[] = {

static mutex_t log_mutex = MUTEX_INITIALIZER;
static volatile juice_log_cb_t log_cb = NULL;
static atomic(juice_log_level_t) log_level = ATOMIC_VAR_INIT(JUICE_LOG_LEVEL_WARN);
static atomic(juice_log_level_t) log_level = JUICE_LOG_LEVEL_WARN;

static bool use_color(void) {
#ifdef _WIN32
Expand Down
1 change: 0 additions & 1 deletion src/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ static inline void thread_set_name_self(const char *name) {
#define atomic_ptr(T) T *volatile
#define atomic_store(a, v) (void)(*(a) = (v))
#define atomic_load(a) (*(a))
#define ATOMIC_VAR_INIT(v) (v)

#endif // if atomics

Expand Down

0 comments on commit e7eb3b9

Please sign in to comment.