Skip to content

Commit

Permalink
inspector: fix coverity scan errors
Browse files Browse the repository at this point in the history
PR-URL: #7324
Reviewed-By: cjihrig - Colin Ihrig <[email protected]>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
  • Loading branch information
Eugene Ostroukhov authored and Fishrock123 committed Jul 5, 2016
1 parent cbe5747 commit 09ecd1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ void SendTargentsListResponse(inspector_socket_t* socket, int port) {
char buffer[sizeof(LIST_RESPONSE_TEMPLATE) + 4096];
char title[2048]; // uv_get_process_title trims the title if too long
int err = uv_get_process_title(title, sizeof(title));
ASSERT_EQ(0, err);
if (err != 0) {
snprintf(title, sizeof(title), "Node.js");
}
char* c = title;
while (!c) {
while (*c != '\0') {
if (*c < ' ' || *c == '\"') {
*c = '_';
}
Expand Down Expand Up @@ -322,6 +324,8 @@ AgentImpl::AgentImpl(Environment* env) : port_(0),
int err;
err = uv_sem_init(&start_sem_, 0);
CHECK_EQ(err, 0);
memset(&data_written_, 0, sizeof(data_written_));
memset(&io_thread_req_, 0, sizeof(io_thread_req_));
}

AgentImpl::~AgentImpl() {
Expand Down

0 comments on commit 09ecd1f

Please sign in to comment.