Browse Source

Optimise out_of_range_error() (PR#2265)

by avoiding the strncopy()
AnHardt 10 years ago
parent
commit
55b23c896a
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      Marlin/Marlin_main.cpp

+ 1
- 3
Marlin/Marlin_main.cpp View File

@@ -2495,10 +2495,8 @@ inline void gcode_G28() {
2495 2495
 #elif defined(ENABLE_AUTO_BED_LEVELING)
2496 2496
 
2497 2497
   void out_of_range_error(const char *p_edge) {
2498
-    char edge[10];
2499
-    strncpy_P(edge, p_edge, 10);
2500 2498
     SERIAL_PROTOCOLPGM("?Probe ");
2501
-    SERIAL_PROTOCOL(edge);
2499
+    serialprintPGM(p_edge);
2502 2500
     SERIAL_PROTOCOLLNPGM(" position out of range.");
2503 2501
   }
2504 2502
 

Loading…
Cancel
Save