Skip to content

Commit

Permalink
Fix fprintzid
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Sep 21, 2023
1 parent 4e81de9 commit d6d757f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/freertos_plus_tcp/z_scout.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@

#include "FreeRTOS.h"

void fprintzid(FILE *stream, z_bytes_t zid) {
if (zid.start == NULL) {
void fprintzid(FILE *stream, z_id_t zid) {
unsigned int zidlen = _z_id_len(zid);
if (zidlen == 0) {
fprintf(stream, "None");
} else {
fprintf(stream, "Some(");
for (unsigned int i = 0; i < zid.len; i++) {
fprintf(stream, "%02X", (int)zid.start[i]);
for (unsigned int i = 0; i < zidlen; i++) {
fprintf(stream, "%02X", (int)zid.id[i]);
}
fprintf(stream, ")");
}
Expand Down

0 comments on commit d6d757f

Please sign in to comment.