diff options
Diffstat (limited to 'src/H5Clog_json.c')
-rw-r--r-- | src/H5Clog_json.c | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c index ad27c94..d5a45be 100644 --- a/src/H5Clog_json.c +++ b/src/H5Clog_json.c @@ -166,15 +166,15 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->outfile); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->outfile); + assert(json_udata->message); /* Write the log message and flush */ n_chars = HDstrlen(json_udata->message); - if ((int)n_chars != HDfprintf(json_udata->outfile, "%s", json_udata->message)) + if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message)) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message") - HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char))); + memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char))); done: FUNC_LEAVE_NOAPI(ret_value) @@ -215,8 +215,8 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(log_info); - HDassert(log_location); + assert(log_info); + assert(log_location); /* Set up the class struct */ log_info->cls = &H5C_json_log_class_g; @@ -249,7 +249,7 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi HDsnprintf(file_name, n_chars, "RANK_%d.%s", mpi_rank, log_location); /* Open log file and set it to be unbuffered */ - if (NULL == (json_udata->outfile = HDfopen(file_name, "w"))) + if (NULL == (json_udata->outfile = fopen(file_name, "w"))) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file") HDsetbuf(json_udata->outfile, NULL); @@ -294,7 +294,7 @@ H5C__json_tear_down_logging(H5C_log_info_t *log_info) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(log_info); + assert(log_info); /* Alias */ json_udata = (H5C_log_json_udata_t *)(log_info->udata); @@ -339,8 +339,8 @@ H5C__json_write_start_log_msg(void *udata) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string (opens the JSON array) */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -382,8 +382,8 @@ H5C__json_write_stop_log_msg(void *udata) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string (closes the JSON array) */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -424,8 +424,8 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -466,8 +466,8 @@ H5C__json_write_destroy_cache_log_msg(void *udata) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -507,8 +507,8 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -549,8 +549,8 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id, FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -593,8 +593,8 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -636,8 +636,8 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id, FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -683,9 +683,9 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -727,9 +727,9 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -772,9 +772,9 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -817,9 +817,9 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -862,8 +862,8 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -908,9 +908,9 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -954,10 +954,10 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent, FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(parent); - HDassert(child); + assert(json_udata); + assert(json_udata->message); + assert(parent); + assert(child); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1003,9 +1003,9 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); if (H5C__READ_ONLY_FLAG == flags) HDstrcpy(rw_s, "READ"); @@ -1057,9 +1057,9 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1102,9 +1102,9 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1148,10 +1148,10 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent, FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(parent); - HDassert(child); + assert(json_udata); + assert(json_udata->message); + assert(parent); + assert(child); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1196,8 +1196,8 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); + assert(json_udata); + assert(json_udata->message); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1242,9 +1242,9 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(config); + assert(json_udata); + assert(json_udata->message); + assert(config); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ @@ -1285,9 +1285,9 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(json_udata); - HDassert(json_udata->message); - HDassert(entry); + assert(json_udata); + assert(json_udata->message); + assert(entry); /* Create the log message string */ HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\ |