diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-29 06:15:32 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-29 06:15:32 (GMT) |
commit | 95c6efcc5eb8f8d2fcf4c1a6a9f9067d0ec2ba6c (patch) | |
tree | 20bbdfa27d1a983bfc1793906ba348667f52301c /plugins | |
parent | 167ed8f193d7d80bc23ecd82c80f8143e74d4ec4 (diff) | |
download | monitoring-plugins-95c6efcc5eb8f8d2fcf4c1a6a9f9067d0ec2ba6c.tar.gz |
1.8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@266 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_by_ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 34e6727..0cffaeb 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c | |||
@@ -249,12 +249,12 @@ process_arguments (int argc, char **argv) | |||
249 | passive = TRUE; | 249 | passive = TRUE; |
250 | break; | 250 | break; |
251 | case 's': /* description of service to check */ | 251 | case 's': /* description of service to check */ |
252 | service = realloc (service, ++services); | 252 | service = realloc (service, (++services) * sizeof(char *)); |
253 | p1 = optarg; | 253 | p1 = optarg; |
254 | while (p2 = index (p1, ':')) { | 254 | while (p2 = index (p1, ':')) { |
255 | *p2 = '\0'; | 255 | *p2 = '\0'; |
256 | asprintf (&service[services-1], "%s", p1); | 256 | asprintf (&service[services-1], "%s", p1); |
257 | service = realloc (service, ++services); | 257 | service = realloc (service, (++services) * sizeof(char *)); |
258 | p1 = p2 + 1; | 258 | p1 = p2 + 1; |
259 | } | 259 | } |
260 | asprintf (&service[services-1], "%s", p1); | 260 | asprintf (&service[services-1], "%s", p1); |