diff --git a/external/android-emugl/host/tools/emugen/ApiGen.cpp b/external/android-emugl/host/tools/emugen/ApiGen.cpp index 142bf0e479386244e06474db667235e6c740c13e..2757d8b3c18b15326fbfc14079f46ed43e4794f2 100644 --- a/external/android-emugl/host/tools/emugen/ApiGen.cpp +++ b/external/android-emugl/host/tools/emugen/ApiGen.cpp @@ -21,8 +21,6 @@ #include #include -#include - /* Define this to 1 to enable support for the 'isLarge' variable flag * that instructs the encoder to send large data buffers by a direct * write through the pipe (i.e. without copying it into a temporary @@ -288,15 +286,9 @@ int ApiGen::genOpcodes(const std::string &filename) } int ApiGen::genAttributesTemplate(const std::string &filename ) { - const char* untrustPath = filename.c_str(); - char path[PATH_MAX] = {0}; - if(realpath(untrustPath, path) == NULL) { - return -1; - } - - FILE *fp = fopen(path, "wt"); + FILE *fp = fopen(filename.c_str(), "wt"); if (fp == NULL) { - perror(path); + perror(filename.c_str()); return -1; } @@ -462,15 +454,9 @@ static void writeEncodingChecksumValidatorOnReturn(const char* funcName, FILE* f int ApiGen::genEncoderImpl(const std::string &filename) { - const char* untrustPath = filename.c_str(); - char path[PATH_MAX] = {0}; - if(realpath(untrustPath, path) == NULL) { - return -1; - } - - FILE *fp = fopen(path, "wt"); + FILE *fp = fopen(filename.c_str(), "wt"); if (fp == NULL) { - perror(path); + perror(filename.c_str()); return -1; } @@ -1347,7 +1333,7 @@ int ApiGen::readAttributes(const std::string & attribFilename) break; } } - + fclose(fp); return 0; }