Skip to content

Commit

Permalink
px4_init.cpp: Properly check the return value of mounting procfs
Browse files Browse the repository at this point in the history
Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Jul 20, 2023
1 parent 56faab9 commit 17a31a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/nuttx/src/px4/common/px4_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int px4_platform_init()
#if defined(CONFIG_FS_PROCFS)
int ret_mount_procfs = mount(nullptr, "/proc", "procfs", 0, nullptr);

if (ret < 0) {
if (ret_mount_procfs < 0) {
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret_mount_procfs);
}

Expand Down

0 comments on commit 17a31a5

Please sign in to comment.