Browse Source

Make use of codepos.

Saves one addition.
Needs one pointer on the stack.

Don't know if this is a go trade.
AnHardt 9 years ago
parent
commit
ae01a6b5f2
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Marlin_main.cpp View File

@@ -2564,14 +2564,14 @@ inline void gcode_M17() {
2564 2564
    * M28: Start SD Write
2565 2565
    */
2566 2566
   inline void gcode_M28() {
2567
-//    char* codepos = strchr_pointer + 4; // ??? not used ???
2568
-    char* starpos = strchr(strchr_pointer + 4, '*');
2567
+    char* codepos = strchr_pointer + 4;
2568
+    char* starpos = strchr(codepos, '*');
2569 2569
     if (starpos) {
2570 2570
       char* npos = strchr(cmdbuffer[bufindr], 'N');
2571 2571
       strchr_pointer = strchr(npos, ' ') + 1;
2572 2572
       *(starpos) = '\0';
2573 2573
     }
2574
-    card.openFile(strchr_pointer + 4, false);
2574
+    card.openFile(codepos, false);
2575 2575
   }
2576 2576
 
2577 2577
   /**

Loading…
Cancel
Save