This is an automated email from the ASF dual-hosted git repository. michallenc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c974eff423563378d82ab3b70932156f96e7096c Author: wangshaoxin <[email protected]> AuthorDate: Thu Aug 21 14:38:03 2025 +0800 drivers/rptun: initialize function pointers with 0 instead of NULL Coverity flags NULL used to initialize function pointers. Use 0 for the unused file operations and the callback arguments. No functional change. Signed-off-by: wangshaoxin <[email protected]> --- drivers/rptun/rptun.c | 12 ++++++------ include/nuttx/rptun/rptun.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index 484ee3797e2..3ad7cc0a551 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -150,11 +150,11 @@ static const struct remoteproc_ops g_rptun_ops = static const struct file_operations g_rptun_fops = { - NULL, /* open */ - NULL, /* close */ - NULL, /* read */ - NULL, /* write */ - NULL, /* seek */ + 0, /* open */ + 0, /* close */ + 0, /* read */ + 0, /* write */ + 0, /* seek */ rptun_dev_ioctl, /* ioctl */ }; @@ -498,7 +498,7 @@ static int rptun_create_device(FAR struct rptun_priv_s *priv, rptun_update_vring_da(rproc, vdev_rsc, role, &shmbase, &shmlen); } - vdev = remoteproc_create_virtio(rproc, index, role, NULL); + vdev = remoteproc_create_virtio(rproc, index, role, 0); if (vdev == NULL) { return -ENOMEM; diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h index a8b958f3918..cf117461379 100644 --- a/include/nuttx/rptun/rptun.h +++ b/include/nuttx/rptun/rptun.h @@ -279,7 +279,7 @@ ****************************************************************************/ #define RPTUN_UNREGISTER_CALLBACK(d) ((d)->ops->register_callback ? \ - (d)->ops->register_callback(d,NULL,NULL) : -ENOSYS) + (d)->ops->register_callback(d,0,NULL) : -ENOSYS) /**************************************************************************** * Name: RPTUN_RESET
