Skip to content

Commit

Permalink
FMT
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Orru <simone.orru@secomind.com>
  • Loading branch information
sorru94 committed Dec 18, 2023
1 parent cf4292f commit cf0d152
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/astarte_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,8 +1455,7 @@ static void on_incoming(
}

char control_prefix[TOPIC_LENGTH] = { 0 };
int ret
= snprintf(control_prefix, TOPIC_LENGTH, "%s/control", device->device_topic);
int ret = snprintf(control_prefix, TOPIC_LENGTH, "%s/control", device->device_topic);
if ((ret < 0) || (ret >= TOPIC_LENGTH)) {
ESP_LOGE(TAG, "Error encoding control prefix");
return;
Expand Down Expand Up @@ -1487,8 +1486,8 @@ static void on_incoming(

int interface_name_len = path_begin - interface_name_begin;
char interface_name[INTERFACE_LENGTH] = { 0 };
ret = snprintf(interface_name, INTERFACE_LENGTH, "%.*s", interface_name_len,
interface_name_begin);
ret = snprintf(
interface_name, INTERFACE_LENGTH, "%.*s", interface_name_len, interface_name_begin);
if ((ret < 0) || (ret >= INTERFACE_LENGTH)) {
ESP_LOGE(TAG, "Error encoding interface name");
return;
Expand Down

0 comments on commit cf0d152

Please sign in to comment.