From: Edgar Fuß Date: Fri, 15 Nov 2019 18:45:28 +0000 (+0100) Subject: Address some clang-format issues X-Git-Tag: collectd-5.11.0~43^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3333%2Fhead;p=thirdparty%2Fcollectd.git Address some clang-format issues Re-format some lines to appease clang-format. clang-format also wants to change the indentation of some #endif comments I didn't introduce and re-order #include's into a form that /does not compile/. --- diff --git a/src/nfs.c b/src/nfs.c index e8ae6408d..b7c74df91 100644 --- a/src/nfs.c +++ b/src/nfs.c @@ -611,20 +611,26 @@ static int nfs_read(void) { static int nfs_read(void) { struct nfsstats ns; size_t size = sizeof(ns); - int mib[] = { CTL_VFS, 2, NFS_NFSSTATS }; + int mib[] = {CTL_VFS, 2, NFS_NFSSTATS}; value_t values[nfs3_procedures_names_num]; int i; /* NetBSD reports v2 statistics mapped to v3 and doen't yet support v4 */ - if (!report_v3) return 0; - if (sysctl(mib, 3, &ns, &size, NULL, 0) != 0) return 1; + if (!report_v3) + return 0; + if (sysctl(mib, 3, &ns, &size, NULL, 0) != 0) + return 1; - for (i = 0; i < nfs3_procedures_names_num; i++) values[i].counter = (derive_t)ns.rpccnt[i]; - nfs_procedures_submit("v3client", nfs3_procedures_names, values, nfs3_procedures_names_num); + for (i = 0; i < nfs3_procedures_names_num; i++) + values[i].counter = (derive_t)ns.rpccnt[i]; + nfs_procedures_submit("v3client", nfs3_procedures_names, values, + nfs3_procedures_names_num); + + for (i = 0; i < nfs3_procedures_names_num; i++) + values[i].counter = (derive_t)ns.srvrpccnt[i]; + nfs_procedures_submit("v3server", nfs3_procedures_names, values, + nfs3_procedures_names_num); - for (i = 0; i < nfs3_procedures_names_num; i++) values[i].counter = (derive_t)ns.srvrpccnt[i]; - nfs_procedures_submit("v3server", nfs3_procedures_names, values, nfs3_procedures_names_num); - return 0; } /* #endif KERNEL_NETBSD */