Skip to content

Commit 9f3cf04

Browse files
committed
Remove useless null check
1 parent 01e49b3 commit 9f3cf04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ArduinoJson/Strings/Adapters/RamString.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ struct StringAdapter<TChar[N], enable_if_t<IsChar<TChar>::value>> {
9090
using AdaptedString = RamString;
9191

9292
static AdaptedString adapt(const TChar* p) {
93+
ARDUINOJSON_ASSERT(p);
9394
auto str = reinterpret_cast<const char*>(p);
94-
return AdaptedString(str, str ? ::strlen(str) : 0);
95+
return AdaptedString(str, ::strlen(str));
9596
}
9697
};
9798

0 commit comments

Comments
 (0)