mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-21 06:08:38 -04:00
1.8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@266 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
167ed8f193
commit
95c6efcc5e
1 changed files with 2 additions and 2 deletions
|
|
@ -249,12 +249,12 @@ process_arguments (int argc, char **argv)
|
|||
passive = TRUE;
|
||||
break;
|
||||
case 's': /* description of service to check */
|
||||
service = realloc (service, ++services);
|
||||
service = realloc (service, (++services) * sizeof(char *));
|
||||
p1 = optarg;
|
||||
while (p2 = index (p1, ':')) {
|
||||
*p2 = '\0';
|
||||
asprintf (&service[services-1], "%s", p1);
|
||||
service = realloc (service, ++services);
|
||||
service = realloc (service, (++services) * sizeof(char *));
|
||||
p1 = p2 + 1;
|
||||
}
|
||||
asprintf (&service[services-1], "%s", p1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue