Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
computerphilosopher committed Jul 31, 2019
1 parent 499bc4b commit f0c64c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd_in_second.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static bool is_bulk_cmd()

static void get_whole_cmd(char* whole_cmd)
{
if (this.collection_name) {
if (strlen(this.collection_name)) {
sprintf(whole_cmd, "%s %s", this.collection_name, this.cmd);
return;
}
Expand Down Expand Up @@ -122,7 +122,9 @@ static void* buffer_flush_thread()

}

write(fd, log_str, strlen(log_str));
if(write(fd, log_str, strlen(log_str)) <= 0) {
mc_logger->log(EXTENSION_LOG_WARNING, NULL, "Can't allocate memory");
}

close(fd);

Expand Down

0 comments on commit f0c64c5

Please sign in to comment.