From 1fb60df60eed9a339d2fa387696215a76b2cbbd8 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 15 Oct 2021 16:47:06 +0200 Subject: [PATCH] Replace ternary operator with if..else.. --- src/model.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model.c b/src/model.c index 6d7a052..26dfa0c 100644 --- a/src/model.c +++ b/src/model.c @@ -271,7 +271,12 @@ e_status play_move(s_utictactoe *p_uttt, s_move *p_move) { // and affect p_move value->last_move = create_empty_move(); value->last_move = p_move; - value->next = ( p_uttt->history == NULL ) ? NULL : p_uttt->history; + if ( p_uttt->history == NULL ) { + value->next = NULL; + } + else { + value->next = p_uttt->history; + } p_uttt->history = value; if ( p_uttt->inception_level != 1 ) {