Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge dev
  • Loading branch information
timpur committed Mar 26, 2018
commit 6ffa5ab1babc628fa4495df49ec8cdf66f406cac
2 changes: 1 addition & 1 deletion src/Homie/Boot/BootConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void BootConfig::_onDeviceInfoRequest(AsyncWebServerRequest *request) {
for (IHomieSetting* iSetting : IHomieSetting::settings) {
JsonObject& jsonSetting = jsonBuffer.createObject();

if (strcmp(iSetting->getType()), "unknown") != 0) {
if (strcmp(iSetting->getType(), "unknown") != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why strcmp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the core of the lib, we should try avoid using String. String will copy the chars into dynamic memory even for something as simple as this... Using String everywhere can lead to heep fragmentation.

jsonSetting["name"] = iSetting->getName();
jsonSetting["description"] = iSetting->getDescription();
jsonSetting["type"] = iSetting->getType();
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.