diff options
author | John Levon <john.levon@joyent.com> | 2018-12-19 17:29:18 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2019-02-01 19:02:22 +0000 |
commit | f1c3c46914bb8b71335ee0d065b1a639f9caad89 (patch) | |
tree | 0e11e330febe5f96180a355f7dc62614341f7dc6 | |
parent | 29c3ebdbcfe9e0ec2a1d2e45961c53e573b9d3ab (diff) | |
download | illumos-joyent-f1c3c46914bb8b71335ee0d065b1a639f9caad89.tar.gz |
10113 fmd_adm_xprt_f should return void
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/cmd/fm/fmstat/common/fmstat.c | 18 | ||||
-rw-r--r-- | usr/src/lib/fm/libfmd_adm/common/fmd_adm.h | 8 |
2 files changed, 15 insertions, 11 deletions
diff --git a/usr/src/cmd/fm/fmstat/common/fmstat.c b/usr/src/cmd/fm/fmstat/common/fmstat.c index adc14fe40b..e779fca00b 100644 --- a/usr/src/cmd/fm/fmstat/common/fmstat.c +++ b/usr/src/cmd/fm/fmstat/common/fmstat.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + #include <fm/fmd_adm.h> #include <strings.h> @@ -373,7 +377,7 @@ modstat_compute(struct modstats *mp, fmd_adm_stats_t *ams) } /*ARGSUSED*/ -static int +static void stat_one_xprt(id_t id, void *ignored) { fmd_adm_stats_t ams; @@ -381,7 +385,7 @@ stat_one_xprt(id_t id, void *ignored) if (fmd_adm_xprt_stats(g_adm, id, &ams) != 0) { warn("failed to retrieve statistics for transport %d", (int)id); - return (0); /* continue on to the next transport */ + return; } for (mp = g_mods; mp != NULL; mp = mp->m_next) { @@ -392,7 +396,7 @@ stat_one_xprt(id_t id, void *ignored) if (mp == NULL && (mp = modstat_create(NULL, id)) == NULL) { warn("failed to allocate memory for transport %d", (int)id); (void) fmd_adm_stats_free(g_adm, &ams); - return (0); + return; } modstat_compute(mp, &ams); @@ -412,7 +416,6 @@ stat_one_xprt(id_t id, void *ignored) mp->m_new->module.fmds_value.str); (void) fmd_adm_stats_free(g_adm, &ams); - return (0); } static void @@ -426,7 +429,7 @@ stat_xprt(void) die("failed to retrieve list of transports"); } -static int +static void stat_one_xprt_auth(id_t id, void *arg) { const char *module = arg; @@ -435,7 +438,7 @@ stat_one_xprt_auth(id_t id, void *arg) if (fmd_adm_xprt_stats(g_adm, id, &ams) != 0) { warn("failed to retrieve statistics for transport %d", (int)id); - return (0); /* continue on to the next transport */ + return; } for (mp = g_mods; mp != NULL; mp = mp->m_next) { @@ -446,7 +449,7 @@ stat_one_xprt_auth(id_t id, void *arg) if (mp == NULL && (mp = modstat_create(NULL, id)) == NULL) { warn("failed to allocate memory for transport %d", (int)id); (void) fmd_adm_stats_free(g_adm, &ams); - return (0); + return; } modstat_compute(mp, &ams); @@ -461,7 +464,6 @@ stat_one_xprt_auth(id_t id, void *arg) } (void) fmd_adm_stats_free(g_adm, &ams); - return (0); } static void diff --git a/usr/src/lib/fm/libfmd_adm/common/fmd_adm.h b/usr/src/lib/fm/libfmd_adm/common/fmd_adm.h index 3dc3fce28f..c7f7e86c9b 100644 --- a/usr/src/lib/fm/libfmd_adm/common/fmd_adm.h +++ b/usr/src/lib/fm/libfmd_adm/common/fmd_adm.h @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + #ifndef _FMD_ADM_H #define _FMD_ADM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <fm/fmd_api.h> #ifdef __cplusplus @@ -129,7 +131,7 @@ extern int fmd_adm_serd_iter(fmd_adm_t *, const char *, fmd_adm_serd_f *, void *); extern int fmd_adm_serd_reset(fmd_adm_t *, const char *, const char *); -typedef int fmd_adm_xprt_f(id_t, void *); +typedef void fmd_adm_xprt_f(id_t, void *); extern int fmd_adm_xprt_iter(fmd_adm_t *, fmd_adm_xprt_f *, void *); extern int fmd_adm_xprt_stats(fmd_adm_t *, id_t, fmd_adm_stats_t *); |