summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-11 14:34:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-06-11 14:34:53 +1000
commit1534fa41e07283acf83a50e6c2bbc8ca2f71ab97 (patch)
tree3f9d221ecb30e16ade602e4cbf01d70fe2df7237 /openbsd-compat
parent34a176995fe658e221b3a14730b695dd9f6943e5 (diff)
- (dtucker) [openbsd-compat/bsd-misc.c] According to the spec the "remainder"
argument to nanosleep may be NULL. Currently this never happens in OpenSSH, but check anyway in case this changes or the code gets used elsewhere.
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index bea3144bd..55f100ac0 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -158,7 +158,8 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
158 tremain.tv_sec = 0; 158 tremain.tv_sec = 0;
159 tremain.tv_usec = 0; 159 tremain.tv_usec = 0;
160 } 160 }
161 TIMEVAL_TO_TIMESPEC(&tremain, rem) 161 if (rem != NULL)
162 TIMEVAL_TO_TIMESPEC(&tremain, rem)
162 163
163 return(rc); 164 return(rc);
164} 165}