
From: Hao Fang <fanghao11@huawei.com> Fix the warning:[-Wempty-body] suggest braces around empty body in an ‘if’ statement. Just simplify the code. Signed-off-by: Hao Fang <fanghao11@huawei.com> --- src/v1/utils/engine_log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v1/utils/engine_log.c b/src/v1/utils/engine_log.c index ef009e5..330defb 100644 --- a/src/v1/utils/engine_log.c +++ b/src/v1/utils/engine_log.c @@ -158,8 +158,7 @@ void ENGINE_LOG_LIMIT(int level, int times, int limit, const char *fmt, ...) fprintf(g_kae_debug_log_file, "\n"); if (ftell(g_kae_debug_log_file) > KAE_LOG_MAX_SIZE) { kae_save_log(g_kae_debug_log_file); - if (ftruncate(g_kae_debug_log_file->_fileno, 0)) - ; + ftruncate(g_kae_debug_log_file->_fileno, 0); fseek(g_kae_debug_log_file, 0, SEEK_SET); } pthread_mutex_unlock(&g_debug_file_mutex); -- 2.33.0