@@ -20,7 +20,7 @@ ZigbeeEP::ZigbeeEP(uint8_t endpoint) {
2020 _cluster_list = nullptr ;
2121 _on_identify = nullptr ;
2222 _read_model = NULL ;
23- _read_manufacturer = NULL ;
23+ _read_manufacturer = NULL ;
2424 _time_status = 0 ;
2525 if (!lock) {
2626 lock = xSemaphoreCreateBinary ();
@@ -51,7 +51,7 @@ bool ZigbeeEP::setManufacturerAndModel(const char *name, const char *model) {
5151 if (basic_cluster == nullptr ) {
5252 log_e (" Failed to get basic cluster" );
5353 return false ;
54- }
54+ }
5555 // Store the length as the first element
5656 zb_name[0 ] = static_cast <char >(name_length); // Cast size_t to char
5757 zb_model[0 ] = static_cast <char >(model_length);
@@ -172,7 +172,7 @@ char *ZigbeeEP::readManufacturer(uint8_t endpoint, uint16_t short_addr, esp_zb_i
172172 free (_read_manufacturer);
173173 }
174174 _read_manufacturer = NULL ;
175-
175+
176176 esp_zb_lock_acquire (portMAX_DELAY);
177177 esp_zb_zcl_read_attr_cmd_req (&read_req);
178178 esp_zb_lock_release ();
@@ -206,7 +206,7 @@ char *ZigbeeEP::readModel(uint8_t endpoint, uint16_t short_addr, esp_zb_ieee_add
206206 read_req.attr_number = ZB_ARRAY_LENTH (attributes);
207207 read_req.attr_field = attributes;
208208
209- if (_read_model != NULL ) {
209+ if (_read_model != NULL ) {
210210 free (_read_model);
211211 }
212212 _read_model = NULL ;
@@ -250,7 +250,7 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
250250 /* Basic cluster attributes */
251251 if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
252252 zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
253- char *_read_manufacturer = (char *) malloc (zbstr->len + 1 );
253+ char *_read_manufacturer = (char *)malloc (zbstr->len + 1 );
254254 if (_read_manufacturer == NULL ) {
255255 log_e (" Failed to allocate memory for manufacturer data" );
256256 xSemaphoreGive (lock);
@@ -263,7 +263,7 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
263263 }
264264 if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
265265 zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
266- char *_read_model = (char *) malloc (zbstr->len + 1 );
266+ char *_read_model = (char *)malloc (zbstr->len + 1 );
267267 if (_read_model == NULL ) {
268268 log_e (" Failed to allocate memory for model data" );
269269 xSemaphoreGive (lock);
0 commit comments