time_to_sleep->tv_nsec > 1000000000
-to- time_to_sleep->tv_nsec >= 1000000000
This commit is contained in:
parent
91518882e0
commit
4c263f605c
@ -29,7 +29,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $
|
* $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep,
|
|||||||
|
|
||||||
/* Check if the time to sleep is legal: */
|
/* Check if the time to sleep is legal: */
|
||||||
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
||||||
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
|
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) {
|
||||||
/* Return an EINVAL error : */
|
/* Return an EINVAL error : */
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $
|
* $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep,
|
|||||||
|
|
||||||
/* Check if the time to sleep is legal: */
|
/* Check if the time to sleep is legal: */
|
||||||
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
||||||
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
|
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) {
|
||||||
/* Return an EINVAL error : */
|
/* Return an EINVAL error : */
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $
|
* $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep,
|
|||||||
|
|
||||||
/* Check if the time to sleep is legal: */
|
/* Check if the time to sleep is legal: */
|
||||||
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 ||
|
||||||
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
|
time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) {
|
||||||
/* Return an EINVAL error : */
|
/* Return an EINVAL error : */
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user