summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/times.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 29c090ee4..e5aab8c27 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -542,7 +542,7 @@ clock_gettime (clockid_t clk_id, struct timespec *tp)
pid = getpid ();
pinfo p (pid);
- if (!p || !p->exists ())
+ if (!p->exists ())
{
set_errno (EINVAL);
return -1;
@@ -765,8 +765,7 @@ clock_setres (clockid_t clk_id, struct timespec *tp)
extern "C" int
clock_getcpuclockid (pid_t pid, clockid_t *clk_id)
{
- pinfo p(pid);
- if (pid != 0 && (!p || !p->exists ()))
+ if (pid != 0 && !pinfo (pid)->exists ())
return (ESRCH);
*clk_id = (clockid_t) PID_TO_CLOCKID (pid);
return 0;