Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 905c4bc

Browse files
committed
use explicit string comparison
1 parent 38575e3 commit 905c4bc

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

contrib/src/modem/db/get-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool GetCommand::execute(const String& command,
1616
String path = in->readLine();
1717
String value = fbase().getString(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() != "") {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

contrib/src/modem/db/push-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool PushCommand::execute(const String& command,
1919

2020
fbase().pushString(path, data);
2121

22-
if (fbase().error()) {
22+
if (fbase().error() != "") {
2323
out->print("-FAIL ");
2424
out->println(fbase().error().c_str());
2525
return false;

contrib/src/modem/db/remove-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool RemoveCommand::execute(const String& command,
1616
String path = in->readLine();
1717
fbase().remove(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() != "") {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

contrib/src/modem/db/set-command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool SetCommand::execute(const String& command,
1919

2020
fbase().setString(path, data);
2121

22-
if (fbase().error()) {
22+
if (fbase().error() != "") {
2323
out->print("-FAIL ");
2424
out->println(fbase().error().c_str());
2525
return false;

contrib/src/modem/db/stream-command.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ bool StreamCommand::execute(const String& command,
1313
return false;
1414
}
1515

16-
std::string path = in->readLine().c_str();
16+
String path = in->readLine().c_str();
1717
fbase().stream(path);
1818

19-
if (fbase().error()) {
19+
if (fbase().error() != "") {
2020
out->print("-FAIL ");
2121
out->println(fbase().error().c_str());
2222
return false;

0 commit comments

Comments
 (0)