[monitoring-plugins] Rename tmp variable to get even with master

Lorenz Kästle git at monitoring-plugins.org
Mon Jan 3 14:40:11 CET 2022


 Module: monitoring-plugins
 Branch: master
 Commit: d496d6523bd0def281f001ddfb2a3f467bd9a4a6
 Author: Lorenz Kästle <lorenz.kaestle at netways.de>
   Date: Mon Jan  3 14:07:54 2022 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d496d65

Rename tmp variable to get even with master

---

 plugins/check_swap.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 2b8013b..bb854be 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -145,12 +145,12 @@ main (int argc, char **argv)
 					xasprintf (&status, "%s [%lu (%d%%)]", status, dskfree_mb, 100 - percent);
 			}
 		}
-    
+
 		/*
 		 * The following sscanf call looks for lines looking like: "SwapTotal: 123" and "SwapFree: 123"
 		 * This format exists at least on Debian Linux with a 5.* kernel
 		 */
-		else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFreCchd]%*[:] %f %*[k]%*[B]", str, &tmp_mb)) {
+		else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFreCchd]%*[:] %f %*[k]%*[B]", str, &tmp_KB)) {
 			if (verbose >= 3) {
 				printf("Got %s with %lu\n", str, tmp_KB);
 			}
@@ -159,10 +159,10 @@ main (int argc, char **argv)
 				dsktotal_mb = tmp_KB / 1024;
 			}
 			else if (strcmp ("Free", str) == 0) {
-				dskfree_mb = dskfree_mb + tmp_mb / 1024;
+				dskfree_mb = dskfree_mb + tmp_KB / 1024;
 			}
 			else if (strcmp ("Cached", str) == 0) {
-				dskfree_mb = dskfree_mb + tmp_mb / 1024;
+				dskfree_mb = dskfree_mb + tmp_KB / 1024;
 			}
 		}
 	}



More information about the Commits mailing list