cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::cmdline
Fix all callers.
This commit is contained in:
parent
571b7689bb
commit
911f7d628d
|
@ -339,7 +339,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
|||
size_t n;
|
||||
pid_t pid = va_arg (arg, pid_t);
|
||||
pinfo p (pid);
|
||||
res = (uintptr_t) p->cmdline (n);
|
||||
res = (uintptr_t) (p ? p->cmdline (n) : NULL);
|
||||
}
|
||||
break;
|
||||
case CW_CHECK_NTSEC:
|
||||
|
|
|
@ -518,7 +518,7 @@ format_process_cmdline (void *data, char *&destbuf)
|
|||
cfree (destbuf);
|
||||
destbuf = NULL;
|
||||
}
|
||||
destbuf = p->cmdline (fs);
|
||||
destbuf = p ? p->cmdline (fs) : NULL;
|
||||
if (!destbuf || !*destbuf)
|
||||
{
|
||||
destbuf = cstrdup ("<defunct>");
|
||||
|
|
|
@ -976,7 +976,7 @@ char *
|
|||
_pinfo::cmdline (size_t& n)
|
||||
{
|
||||
char *s = NULL;
|
||||
if (!this || !pid)
|
||||
if (!pid)
|
||||
return NULL;
|
||||
if (ISSTATE (this, PID_NOTCYGWIN))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue