summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 489f450)
raw | patch | inline | side by side (parent: 489f450)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 29 Jan 2003 04:11:49 +0000 (04:11 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 29 Jan 2003 04:11:49 +0000 (04:11 +0000) |
Fixed -p options (652082 - Ton Voon)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@261 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@261 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_procs.c | patch | blob | history |
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 3849c77666c87db12c3c2e9ac2dca41bc7ab184a..4187a07955f1a839f6497e673feea8ab7ea60bf2 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
int verbose = FALSE;
int uid;
int ppid;
-char *statopts = NULL;
-char *prog = NULL;
-char *args = NULL;
-char *fmt = NULL;
+char *statopts = "";
+char *prog = "";
+char *args = "";
+char *fmt = "";
char tmp[MAX_INPUT_BUFFER];
int
};
#endif
- asprintf (&fmt, "");
-
for (c = 1; c < argc; c++)
if (strcmp ("-to", argv[c]) == 0)
strcpy (argv[c], "-t");
}
case 'p': /* process id */
if (sscanf (optarg, "%d%[^0-9]", &ppid, tmp) == 1) {
- asprintf (&fmt, "%s%sPPID = %d", (options ? ", " : ""), ppid);
+ asprintf (&fmt, "%s%sPPID = %d", fmt, (options ? ", " : ""), ppid);
options |= PPID;
break;
}
uid = pw->pw_uid;
}
user = pw->pw_name;
- asprintf (&fmt, "%s%sUID = %d (%s)", (options ? ", " : ""), fmt,
+ asprintf (&fmt, "%s%sUID = %d (%s)", fmt, (options ? ", " : ""),
uid, user);
options |= USER;
break;