summaryrefslogtreecommitdiffstats
path: root/plugins/check_procs.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r--plugins/check_procs.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 01acc93..d05020b 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -96,9 +96,6 @@ main (int argc, char **argv)
96 char procstat[8]; 96 char procstat[8];
97 char procetime[MAX_INPUT_BUFFER] = { '\0' }; 97 char procetime[MAX_INPUT_BUFFER] = { '\0' };
98 char *procargs; 98 char *procargs;
99#ifdef HAVE_BASENAME
100 char *temp_string;
101#endif
102 99
103 const char *zombie = "Z"; 100 const char *zombie = "Z";
104 101
@@ -179,10 +176,7 @@ main (int argc, char **argv)
179 strip (procargs); 176 strip (procargs);
180 177
181 /* Some ps return full pathname for command. This removes path */ 178 /* Some ps return full pathname for command. This removes path */
182#ifdef HAVE_BASENAME 179 procprog = basename(procprog);
183 temp_string = strdup(procprog);
184 procprog = basename(temp_string);
185#endif /* HAVE_BASENAME */
186 180
187 /* we need to convert the elapsed time to seconds */ 181 /* we need to convert the elapsed time to seconds */
188 procseconds = convert_to_seconds(procetime); 182 procseconds = convert_to_seconds(procetime);