diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-07-24 14:27:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 14:27:06 +0200 |
commit | 43131b73d69e77a3faee69814dac1bbc88162887 (patch) | |
tree | 8e3b4a532717659649954b879fb685fce353e863 /plugins | |
parent | af06d34071608641295eecd46edb0c4dbde13872 (diff) | |
parent | 7c3098270c5481f64438525be5883f070ebc16a1 (diff) | |
download | monitoring-plugins-43131b73d69e77a3faee69814dac1bbc88162887.tar.gz |
Merge pull request #1876 from RincewindsHat/check_swap_scanf_expressions
Changing remaining sscanf format specifier to unsigned long
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_swap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c index 05f19ad4..cd965e31 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c | |||
@@ -178,7 +178,7 @@ main (int argc, char **argv) | |||
178 | # ifdef _AIX | 178 | # ifdef _AIX |
179 | if (!allswaps) { | 179 | if (!allswaps) { |
180 | xasprintf(&swap_command, "%s", "/usr/sbin/lsps -s"); | 180 | xasprintf(&swap_command, "%s", "/usr/sbin/lsps -s"); |
181 | xasprintf(&swap_format, "%s", "%f%*s %f"); | 181 | xasprintf(&swap_format, "%s", "%lu%*s %lu"); |
182 | conv_factor = 1; | 182 | conv_factor = 1; |
183 | } | 183 | } |
184 | # endif | 184 | # endif |
@@ -205,9 +205,9 @@ main (int argc, char **argv) | |||
205 | temp_buffer = strtok (input_buffer, " \n"); | 205 | temp_buffer = strtok (input_buffer, " \n"); |
206 | while (temp_buffer) { | 206 | while (temp_buffer) { |
207 | if (strstr (temp_buffer, "blocks")) | 207 | if (strstr (temp_buffer, "blocks")) |
208 | sprintf (str, "%s %s", str, "%f"); | 208 | sprintf (str, "%s %s", str, "%lu"); |
209 | else if (strstr (temp_buffer, "dskfree")) | 209 | else if (strstr (temp_buffer, "dskfree")) |
210 | sprintf (str, "%s %s", str, "%f"); | 210 | sprintf (str, "%s %s", str, "%lu"); |
211 | else | 211 | else |
212 | sprintf (str, "%s %s", str, "%*s"); | 212 | sprintf (str, "%s %s", str, "%*s"); |
213 | temp_buffer = strtok (NULL, " \n"); | 213 | temp_buffer = strtok (NULL, " \n"); |