You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2015/12/04 16:42:15 UTC

svn commit: r1717985 - /httpd/httpd/trunk/modules/http2/h2_session.c

Author: icing
Date: Fri Dec  4 15:42:15 2015
New Revision: 1717985

URL: http://svn.apache.org/viewvc?rev=1717985&view=rev
Log:
removing floor() usage as not available everywhere

Modified:
    httpd/httpd/trunk/modules/http2/h2_session.c

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1717985&r1=1717984&r2=1717985&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Fri Dec  4 15:42:15 2015
@@ -14,7 +14,6 @@
  */
 
 #include <assert.h>
-#include <math.h>
 #include <apr_thread_cond.h>
 #include <apr_base64.h>
 #include <apr_strings.h>
@@ -1342,7 +1341,7 @@ struct h2_stream *h2_session_push(h2_ses
 
 static int valid_weight(float f) 
 {
-    int w = floor(f);
+    int w = (int)f;
     return (w < NGHTTP2_MIN_WEIGHT? NGHTTP2_MIN_WEIGHT : 
             (w > NGHTTP2_MAX_WEIGHT)? NGHTTP2_MAX_WEIGHT : w);
 }