Skip to content

Commit

Permalink
Revert "hotfix for logger: use '%i' instead of '%zu'"
Browse files Browse the repository at this point in the history
  This reverts commit e6aa035.
  Root cause was fixe in Nuttx and backported
  • Loading branch information
davids5 authored and julianoes committed Jul 25, 2019
1 parent df05999 commit e296297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,7 @@ void Logger::write_info(LogType type, const char *name, const char *value)

/* construct format key (type and name) */
size_t vlen = strlen(value);
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%i] %s", (int)vlen, name);
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%zu] %s", vlen, name);
size_t msg_size = sizeof(msg) - sizeof(msg.key) + msg.key_len;

/* copy string value directly to buffer */
Expand All @@ -2037,7 +2037,7 @@ void Logger::write_info_multiple(LogType type, const char *name, const char *val

/* construct format key (type and name) */
size_t vlen = strlen(value);
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%i] %s", (int)vlen, name);
msg.key_len = snprintf(msg.key, sizeof(msg.key), "char[%zu] %s", vlen, name);
size_t msg_size = sizeof(msg) - sizeof(msg.key) + msg.key_len;

/* copy string value directly to buffer */
Expand Down

0 comments on commit e296297

Please sign in to comment.