]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Address some clang-format issues 3333/head
authorEdgar Fuß <ef@math.uni-bonn.de>
Fri, 15 Nov 2019 18:45:28 +0000 (19:45 +0100)
committerGitHub <noreply@github.com>
Fri, 15 Nov 2019 18:45:28 +0000 (19:45 +0100)
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/.

src/nfs.c

index e8ae6408dfbe718fe85f3dd15163462823919613..b7c74df916aae12fad3897c41146cd49d01d4f1b 100644 (file)
--- 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 */