diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-04-27 13:25:10 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-04-27 13:25:10 (GMT) |
commit | 34cb16d283298885b73f75146433a703e93c0d4f (patch) | |
tree | c1e7b1b0ff0ad3e59e4921dd5e65d4527cd23d3f /plugins/check_procs.c | |
parent | 37ebbab7fbd251c4c357459ff738847f5a5a4883 (diff) | |
download | monitoring-plugins-34cb16d283298885b73f75146433a703e93c0d4f.tar.gz |
Internal version of basename if one not found in system
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1383 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r-- | plugins/check_procs.c | 8 |
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); |