summaryrefslogtreecommitdiffstats
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-11-09 10:31:48 (GMT)
committerGitHub <noreply@github.com>2024-11-09 10:31:48 (GMT)
commited52a7dbb7997c8fa9779e89fd2012eae85b2ce0 (patch)
treece9808a8c635f9add0f592540168d771f4ee5d0a /plugins/check_tcp.c
parentb370072a5a1e21876abf8cf95f4622c02565ae07 (diff)
parent6eb5be9e30b23035632b674f6b46c18313cde63b (diff)
downloadmonitoring-plugins-ed52a7dbb7997c8fa9779e89fd2012eae85b2ce0.tar.gz
Merge pull request #2045 from RincewindsHat/fix/calloc_argument_order
Fix argument order of calloc on several occasions
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index c13ac76..49ad096 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -119,7 +119,7 @@ int main(int argc, char **argv) {
119 119
120 /* set up a reasonable buffer at first (will be realloc()'ed if 120 /* set up a reasonable buffer at first (will be realloc()'ed if
121 * user specifies other options) */ 121 * user specifies other options) */
122 server_expect = calloc(sizeof(char *), 2); 122 server_expect = calloc(2, sizeof(char *));
123 123
124 /* determine defaults for this service's protocol */ 124 /* determine defaults for this service's protocol */
125 if (!strncmp(SERVICE, "UDP", 3)) { 125 if (!strncmp(SERVICE, "UDP", 3)) {