From 7bcf2b03b10d7bab75e5e0f7adc2b8c9283f34d1 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 29 Oct 2009 14:16:55 +0000 Subject: [PATCH] remove times underflow/overflow checks, they break tests git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23084 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/kdc_util.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index b2d8d13bd..96dc34135 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -2639,8 +2639,7 @@ kdc_get_ticket_endtime(krb5_context context, until = min(till, endtime); - /* check for underflow */ - life = (until < starttime) ? 0 : until - starttime; + life = until - starttime; if (client->max_life != 0) life = min(life, client->max_life); @@ -2649,10 +2648,6 @@ kdc_get_ticket_endtime(krb5_context context, if (max_life_for_realm != 0) life = min(life, max_life_for_realm); - /* check for overflow */ - if (starttime > kdc_infinity - life) - *out_endtime = kdc_infinity; - else - *out_endtime = starttime + life; + *out_endtime = starttime + life; } -- 2.26.2