@@ -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;