Switch a few pointers that don't manipute strings to const

This commit is contained in:
Yuri D'Elia 2022-08-06 23:08:03 +02:00
parent a533ba3574
commit 68c04ca2f6
2 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ void print_hex_word(daddr_t val)
print_hex_byte(val & 0xFF);
}
int parse_hex(char* hex, uint8_t* data, int count)
int parse_hex(const char* hex, uint8_t* data, int count)
{
int parsed = 0;
while (*hex)

View file

@ -4248,7 +4248,7 @@ void process_commands()
*/
else if (code_seen_P(PSTR("M0")) || code_seen_P(PSTR("M1 "))) {// M0 and M1 - (Un)conditional stop - Wait for user button press on LCD
char *src = strchr_pointer + 2;
const char *src = strchr_pointer + 2;
codenum = 0;
bool hasP = false, hasS = false;
if (code_seen('P')) {
@ -5774,7 +5774,7 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
}
starpos = (strchr(strchr_pointer + 4,'*'));
char* namestartpos = (strchr(strchr_pointer + 4,'!')); //find ! to indicate filename string start.
const char* namestartpos = (strchr(strchr_pointer + 4,'!')); //find ! to indicate filename string start.
if(namestartpos==NULL)
{
namestartpos=strchr_pointer + 4; //default name position, 4 letters after the M