Skip to content

Commit e380196

Browse files
committed
use sizeof
1 parent f120013 commit e380196

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/AsyncWebServerLogging.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,8 @@
104104
#define _ASYNC_WS_LOG(level, format, ...) \
105105
do { \
106106
static const char __fmt[] PROGMEM = "%c async_ws %d: " format "\n"; \
107-
char __buf[64]; \
108-
strncpy_P(__buf, __fmt, sizeof(__buf) - 1); \
109-
__buf[sizeof(__buf) - 1] = '\0'; \
107+
char __buf[sizeof(__fmt)]; \
108+
strcpy_P(__buf, __fmt); \
110109
ets_printf(__buf, level, __LINE__, ##__VA_ARGS__); \
111110
} while (0)
112111
// error

0 commit comments

Comments
 (0)