From ae01a6b5f2c7236ee8b6ba4b2b14c33e3e17fddb Mon Sep 17 00:00:00 2001 From: AnHardt Date: Thu, 19 Mar 2015 09:45:16 +0100 Subject: [PATCH] Make use of codepos. Saves one addition. Needs one pointer on the stack. Don't know if this is a go trade. --- Marlin/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e5e548c526..5527cebb61 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2564,14 +2564,14 @@ inline void gcode_M17() { * M28: Start SD Write */ inline void gcode_M28() { -// char* codepos = strchr_pointer + 4; // ??? not used ??? - char* starpos = strchr(strchr_pointer + 4, '*'); + char* codepos = strchr_pointer + 4; + char* starpos = strchr(codepos, '*'); if (starpos) { char* npos = strchr(cmdbuffer[bufindr], 'N'); strchr_pointer = strchr(npos, ' ') + 1; *(starpos) = '\0'; } - card.openFile(strchr_pointer + 4, false); + card.openFile(codepos, false); } /**