clang-tidy modernize-use-nullptr

This commit is contained in:
Daniel Agar
2017-02-01 22:15:50 -05:00
parent ec2467d4a5
commit e927f3e040
48 changed files with 155 additions and 153 deletions
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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),