diff options
Diffstat (limited to 'src/google/protobuf/compiler/subprocess.cc')
-rw-r--r-- | src/google/protobuf/compiler/subprocess.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/subprocess.cc b/src/google/protobuf/compiler/subprocess.cc index 2a8688d6..2e5a89ac 100644 --- a/src/google/protobuf/compiler/subprocess.cc +++ b/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; |