diff options
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 1 | ||||
-rw-r--r-- | twrp-functions.cpp | 3 |
2 files changed, 0 insertions, 4 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index fc3973738..fbd80dc94 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1366,7 +1366,6 @@ int GUIAction::terminalcommand(std::string arg) keep_going = 0; } else { // Try to read output - memset(line, 0, sizeof(line)); if(fgets(line, sizeof(line), fp) != NULL) gui_print("%s", line); // Display output else diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 3bc879929..6780e1db2 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -64,10 +64,7 @@ int TWFunc::Exec_Cmd(const string& cmd, string &result) { exec = __popen(cmd.c_str(), "r"); if (!exec) return -1; while(!feof(exec)) { - memset(&buffer, 0, sizeof(buffer)); if (fgets(buffer, 128, exec) != NULL) { - buffer[128] = '\n'; - buffer[129] = 0; result += buffer; } } |