From 46bdc9681507e3a8484b2050a8f3ff8c229e890d Mon Sep 17 00:00:00 2001 From: Xuefer Date: Wed, 15 Apr 2015 19:49:45 +0800 Subject: remove useless memset and \n fgets reads up to one byte less than size then with \0 at the end adding \n after \0 is useless too Change-Id: I7758d7a8f885bdde2b491a9cb75800f831d77c1f --- gui/action.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'gui/action.cpp') 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 -- cgit v1.2.3