Use string constants in place of char*

This commit is contained in:
ford-jones 2025-08-21 12:00:19 +12:00
parent 9b0fbcf1d9
commit f6bb1977bc

View File

@ -303,16 +303,16 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
bool RangeTestModuleRadio::removeFile() bool RangeTestModuleRadio::removeFile()
{ {
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
char *fp = "/static/rangetest.csv"; if (FSCom.exists("/static/rangetest.csv")) {
if (FSCom.exists(fp)) {
LOG_INFO("Deleting previous range test."); LOG_INFO("Deleting previous range test.");
bool result = FSCom.remove(fp); bool result = FSCom.remove("/static/rangetest.csv");
if (!result) { if (!result) {
LOG_ERROR("Failed to delete rangeTest.csv"); LOG_ERROR("Failed to delete rangeTest.csv");
return 0; return 0;
} }
LOG_INFO("Range test removed.");
} }
#endif #endif
return 1; return 1;
}; }