From 1b87195c3c0631d9b6bd4524b621948121e83e29 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 29 Sep 2022 12:02:57 -0400 Subject: [PATCH] Fix unchecked return values 2a493a4c7127258b14c39e8c71a9d6f01167c5cd was intended to fix all instances of coverity reported unchecked return values, but unfortunately, two were missed by mistake. This commit fixes the unchecked return values that had been missed. Reviewed-by: Brian Behlendorf Reviewed-by: Neal Gompa Reviewed-by: Richard Elling Signed-off-by: Richard Yao Closes #13945 --- cmd/zpool_influxdb/zpool_influxdb.c | 4 +++- module/zfs/zfs_fm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/zpool_influxdb/zpool_influxdb.c b/cmd/zpool_influxdb/zpool_influxdb.c index 8440d8b57..73a9bedb8 100644 --- a/cmd/zpool_influxdb/zpool_influxdb.c +++ b/cmd/zpool_influxdb/zpool_influxdb.c @@ -687,8 +687,10 @@ print_recursive_stats(stat_printer_f func, nvlist_t *nvroot, sizeof (vdev_name)); for (c = 0; c < children; c++) { - print_recursive_stats(func, child[c], pool_name, + err = print_recursive_stats(func, child[c], pool_name, vdev_name, descend); + if (err) + return (err); } } return (0); diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c index a16c62675..06aa1214a 100644 --- a/module/zfs/zfs_fm.c +++ b/module/zfs/zfs_fm.c @@ -1461,7 +1461,7 @@ zfs_ereport_snapshot_post(const char *subclass, spa_t *spa, const char *name) nvlist_t *aux; aux = fm_nvlist_create(NULL); - nvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_SNAPSHOT_NAME, name); + fnvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_SNAPSHOT_NAME, name); zfs_post_common(spa, NULL, FM_RSRC_CLASS, subclass, aux); fm_nvlist_destroy(aux, FM_NVA_FREE);