mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-11-30 10:13:04 +05:00
fix: initialize sensor names and group header includes
Value-initialize sensor name buffers so newly constructed settings start with an empty, NUL-terminated name instead of uninitialized bytes. Group standard C and C++ headers before Arduino and ESP-IDF headers, keeping project headers last.
This commit is contained in:
1 parent
05906b5eb7
commit
108594f2d9
1 file changed
+4
-3
+4
-3
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <errno.h>
|
||||
#include <esp_log.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -14,6 +12,9 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <esp_log.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "utils.h"
|
||||
#include "strings_shared.h"
|
||||
@@ -103,7 +104,7 @@ public:
|
||||
|
||||
typedef struct {
|
||||
bool enabled = false;
|
||||
char name[33];
|
||||
char name[33] = {};
|
||||
char slug[33] = {};
|
||||
Purpose purpose = Purpose::NOT_CONFIGURED;
|
||||
Type type = Type::NOT_CONFIGURED;
|
||||
|
||||
Reference in new issue
Block a user