andrzej-kaczmarek commented on a change in pull request #1439: test/runtest: Null-terminate segments of log entry URL: https://github.com/apache/mynewt-core/pull/1439#discussion_r222214341
########## File path: test/runtest/src/runtest.c ########## @@ -165,8 +165,10 @@ runtest_log_result(const char *msg, bool passed) int m_len; int len; - /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> */ - len = 35 + strlen(runtest_token); + /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> plus three + * null-terminators. + */ + len = sizeof 38 + strlen(runtest_token); Review comment: I guess 38 is 35+3 ("plus three null-terminators"), but what 'sizeof` does here? if this is correct, then I guess it should be written in less cryptic way :) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services