remove debug log, merge common code

This commit is contained in:
openshwprojects
2023-02-09 21:52:15 +01:00
parent 7469882b43
commit e0589fcb4d
2 changed files with 16 additions and 28 deletions

View File

@@ -367,8 +367,9 @@ const char* hass_build_discovery_json(HassDeviceInfo* info) {
/// @brief Release allocated memory.
/// @param info
void hass_free_device_info(HassDeviceInfo* info) {
if (info == NULL) return;
addLogAdv(LOG_DEBUG, LOG_FEATURE_HASS, "hass_free_device_info \r\n");
if (info == NULL)
return;
//addLogAdv(LOG_DEBUG, LOG_FEATURE_HASS, "hass_free_device_info \r\n");
if (info->root != NULL) {
cJSON_Delete(info->root);