Skip to content

Commit

Permalink
AP_JSON: Ensure all printf() calls end with line break
Browse files Browse the repository at this point in the history
  • Loading branch information
nexton-winjeel authored and peterbarker committed May 7, 2024
1 parent 0618235 commit c9f4c47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_JSON/AP_JSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AP_JSON::value *AP_JSON::load_json(const char *filename)

char *start = strchr(buf, '{');
if (!start) {
::printf("Invalid json %s", filename);
::printf("Invalid json %s\n", filename);
delete[] buf;
return nullptr;
}
Expand All @@ -89,13 +89,13 @@ AP_JSON::value *AP_JSON::load_json(const char *filename)

AP_JSON::value *obj = new AP_JSON::value;
if (obj == nullptr) {
::printf("Invalid allocate json for %s", filename);
::printf("Invalid allocate json for %s\n", filename);
delete[] buf;
return nullptr;
}
std::string err = AP_JSON::parse(*obj, start);
if (!err.empty()) {
::printf("parse failed for json %s", filename);
::printf("parse failed for json %s\n", filename);
delete obj;
delete[] buf;
return nullptr;
Expand Down

0 comments on commit c9f4c47

Please sign in to comment.