Skip to content

Commit

Permalink
Merge pull request nats-io#361 from paoloteti/static_analisys
Browse files Browse the repository at this point in the history
Fix identical inner and outer 'if' condition
  • Loading branch information
kozlovic authored Sep 15, 2020
2 parents 831bc73 + a50eddb commit da5a242
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,11 +842,8 @@ natsMsg_create(natsMsg **newMsg,
if (replyLen > 0)
{
msg->reply = (const char*) ptr;
if (replyLen > 0)
{
memcpy(ptr, reply, replyLen);
ptr += replyLen;
}
memcpy(ptr, reply, replyLen);
ptr += replyLen;
*(ptr++) = '\0';
}
else
Expand Down

0 comments on commit da5a242

Please sign in to comment.