Commit 7c1e353e authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(assign_timeval): The logic for detecting overflow was wrong.

parent 38587e79
/*
* $Id: conf-file.c,v 1.31 2003/07/21 22:26:16 ceder Exp $
* $Id: conf-file.c,v 1.32 2003/07/23 08:35:43 ceder Exp $
* Copyright (C) 1994-1995, 1998-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -474,7 +474,7 @@ assign_timeval(const char *val,
err = (tv.tv_sec + 1.0e-6 * tv.tv_usec) - number;
if (err < 0)
err = -err;
if ((err > 1.0e-6 && err < 1.0e-6 * number)
if ((err > 1.0e-6 && err > 1.0e-6 * number)
|| tv.tv_sec < 0
|| tv.tv_usec < 0
|| tv.tv_usec >= 1000000)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment