From: cheloha Date: Tue, 13 Feb 2018 17:35:32 +0000 (+0000) Subject: Normalize handle limit timeval in microsecond (usec) case. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=081c88af79cba3cf093744f4391d1abb93b3ad79;p=openbsd Normalize handle limit timeval in microsecond (usec) case. Makes stuff like limit 1500000 usec work correctly. ok millert@ tb@ --- diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y index eff199d93a1..3d5254907de 100644 --- a/usr.sbin/hostapd/parse.y +++ b/usr.sbin/hostapd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.53 2017/01/05 13:53:09 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.54 2018/02/13 17:35:32 cheloha Exp $ */ /* * Copyright (c) 2004, 2005, 2006 Reyk Floeter @@ -500,7 +500,8 @@ limit : /* empty */ yyerror("limit out of range: %lld usec", $2); YYERROR; } - frame.f_limit.tv_usec = $2; + frame.f_limit.tv_sec = $2 / 1000000; + frame.f_limit.tv_usec = $2 % 1000000; } ;