diff options
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 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)) { |
diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 2e53dc0..7484314 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c | |||
@@ -130,7 +130,7 @@ static int np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr) { | |||
130 | /* each arg must be whitespace-separated, so args can be a maximum | 130 | /* each arg must be whitespace-separated, so args can be a maximum |
131 | * of (len / 2) + 1. We add 1 extra to the mix for NULL termination */ | 131 | * of (len / 2) + 1. We add 1 extra to the mix for NULL termination */ |
132 | argc = (cmdlen >> 1) + 2; | 132 | argc = (cmdlen >> 1) + 2; |
133 | argv = calloc(sizeof(char *), argc); | 133 | argv = calloc(argc, sizeof(char *)); |
134 | 134 | ||
135 | if (argv == NULL) { | 135 | if (argv == NULL) { |
136 | printf("%s\n", _("Could not malloc argv array in popen()")); | 136 | printf("%s\n", _("Could not malloc argv array in popen()")); |
diff --git a/plugins/utils.c b/plugins/utils.c index f11db73..6d366e3 100644 --- a/plugins/utils.c +++ b/plugins/utils.c | |||
@@ -185,7 +185,7 @@ bool is_percentage_expression(const char str[]) { | |||
185 | return false; | 185 | return false; |
186 | } | 186 | } |
187 | 187 | ||
188 | char *foo = calloc(sizeof(char), len + 1); | 188 | char *foo = calloc(len + 1, sizeof(char)); |
189 | 189 | ||
190 | if (!foo) { | 190 | if (!foo) { |
191 | die(STATE_UNKNOWN, _("calloc failed \n")); | 191 | die(STATE_UNKNOWN, _("calloc failed \n")); |