Add malloc cast

pull/3485/head
Jisi Liu 8 years ago
parent fd31899f01
commit b4c0cfe3a4
  1. 4
      src/google/protobuf/compiler/subprocess.cc

@ -54,8 +54,8 @@ namespace compiler {
namespace {
char* portable_strdup(const char* s) {
char* ns = malloc(strlen(s) + 1);
if (ns) {
char* ns = (char*) malloc(strlen(s) + 1);
if (ns != NULL) {
strcpy(ns, s);
}
return ns;

Loading…
Cancel
Save