Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions sample/sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ static int send_ctrl_msg(const uint8_t instance)
* in SRAM and A53 will complain about unaligned accesses.
*/
sprintf(tmp, "SENDING MESSAGES: %d", app.num_msgs);
strcpy(app.ctrl_shm, tmp);

char *src = tmp;
char *dst = app.ctrl_shm;
while((*dst++ = *src++) != '\0');

sample_info("ch %d >> %ld bytes: %s\n", chan_id, strlen(tmp), tmp);

Expand Down Expand Up @@ -278,7 +281,10 @@ static void generate_msg(char *s, int len, int msg_no)
* in SRAM and A53 will complain about unaligned accesses.
*/
sprintf(tmp, "#%d HELLO WORLD! from KERNEL", msg_no);
strcpy(s, tmp);

char *src = tmp;
char *dst = s;
while((*dst++ = *src++) != '\0');
}

/**
Expand Down