4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 11:30:56 +08:00

cygwin: Remove comparison of 'this' to 'NULL' in _pinfo::environ

Fix all callers.
This commit is contained in:
Ken Brown 2017-09-16 22:04:17 -04:00 committed by Corinna Vinschen
parent 6cd1978fc8
commit d17c45f200
2 changed files with 2 additions and 2 deletions

View File

@ -583,7 +583,7 @@ format_process_environ (void *data, char *&destbuf)
cfree (destbuf); cfree (destbuf);
destbuf = NULL; destbuf = NULL;
} }
destbuf = p->environ (fs); destbuf = p ? p->environ (fs) : NULL;
if (!destbuf || !*destbuf) if (!destbuf || !*destbuf)
{ {
destbuf = cstrdup ("<defunct>"); destbuf = cstrdup ("<defunct>");

View File

@ -1036,7 +1036,7 @@ char *
_pinfo::environ (size_t& n) _pinfo::environ (size_t& n)
{ {
char **env = NULL; char **env = NULL;
if (!this || !pid) if (!pid)
return NULL; return NULL;
if (ISSTATE (this, PID_NOTCYGWIN)) if (ISSTATE (this, PID_NOTCYGWIN))
{ {