Optimise out_of_range_error() (PR#2265)

by avoiding the strncopy()
master
AnHardt 10 years ago committed by Richard Wackerbarth
parent b0860adab6
commit 55b23c896a

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

Loading…
Cancel
Save