Having a first stab at flawfinder errors
This commit is contained in:
+3
-3
@@ -110,12 +110,12 @@ const char *getDeviceName()
|
||||
|
||||
// Meshtastic_ab3c or Shortname_abcd
|
||||
static char name[20];
|
||||
sprintf(name, "%02x%02x", dmac[4], dmac[5]);
|
||||
snprintf(name, sizeof(name), "%02x%02x", dmac[4], dmac[5]);
|
||||
// if the shortname exists and is NOT the new default of ab3c, use it for BLE name.
|
||||
if ((owner.short_name != NULL) && (strcmp(owner.short_name, name) != 0)) {
|
||||
sprintf(name, "%s_%02x%02x", owner.short_name, dmac[4], dmac[5]);
|
||||
snprintf(name, sizeof(name), "%s_%02x%02x", owner.short_name, dmac[4], dmac[5]);
|
||||
} else {
|
||||
sprintf(name, "Meshtastic_%02x%02x", dmac[4], dmac[5]);
|
||||
snprintf(name, sizeof(name), "Meshtastic_%02x%02x", dmac[4], dmac[5]);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user