mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 14:33:34 +08:00
clang-tidy modernize-use-nullptr
This commit is contained in:
@@ -332,14 +332,14 @@ Geofence::loadFromFile(const char *filename)
|
||||
/* open the mixer definition file */
|
||||
fp = fopen(GEOFENCE_FILENAME, "r");
|
||||
|
||||
if (fp == NULL) {
|
||||
if (fp == nullptr) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
/* create geofence points from valid lines and store in DM */
|
||||
for (;;) {
|
||||
/* get a line, bail on error/EOF */
|
||||
if (fgets(line, sizeof(line), fp) == NULL) {
|
||||
if (fgets(line, sizeof(line), fp) == nullptr) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ Navigator *g_navigator;
|
||||
}
|
||||
|
||||
Navigator::Navigator() :
|
||||
SuperBlock(NULL, "NAV"),
|
||||
SuperBlock(nullptr, "NAV"),
|
||||
_task_should_exit(false),
|
||||
_navigator_task(-1),
|
||||
_mavlink_log_pub(nullptr),
|
||||
|
||||
Reference in New Issue
Block a user