assume buffer contains copied path if path == NULL

This commit is contained in:
Doug MacEachern 2008-03-27 00:53:06 +00:00
parent 5a32b71a2a
commit 5f0f5db9ed
1 changed files with 3 additions and 1 deletions

View File

@ -3474,7 +3474,9 @@ char *sigar_service_exe_get(char *path, char *buffer, int basename)
{
char *ptr;
strncpy(buffer, path, SIGAR_CMDLINE_MAX);
if (path) {
strncpy(buffer, path, SIGAR_CMDLINE_MAX);
}
path = buffer;
if (*path == '"') {