Correct minor issues reported by the analyzer.

Found with the Clang Static Analyzer.
This commit is contained in:
Fernando Tarlá Cardoso Lemos
2011-02-25 21:45:52 -03:00
committed by Axel Wagner
parent 64f2a7561d
commit c8032d552d
2 changed files with 4 additions and 3 deletions

View File

@ -248,7 +248,8 @@ int i3_send_msg(uint32_t type, const char *payload) {
memcpy(walk, &type, sizeof(uint32_t));
walk += sizeof(uint32_t);
strncpy(walk, payload, len);
if (payload != NULL)
strncpy(walk, payload, len);
uint32_t written = 0;