diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-09 11:31:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-09 11:31:48 +0100 |
| commit | ed52a7dbb7997c8fa9779e89fd2012eae85b2ce0 (patch) | |
| tree | ce9808a8c635f9add0f592540168d771f4ee5d0a /plugins/check_tcp.c | |
| parent | b370072a5a1e21876abf8cf95f4622c02565ae07 (diff) | |
| parent | 6eb5be9e30b23035632b674f6b46c18313cde63b (diff) | |
| download | monitoring-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index c13ac767..49ad096c 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)) { |
