]> granicus.if.org Git - apache/commitdiff
removing floor() usage as not available everywhere
authorStefan Eissing <icing@apache.org>
Fri, 4 Dec 2015 15:42:15 +0000 (15:42 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 4 Dec 2015 15:42:15 +0000 (15:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1717985 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_session.c

index e5a158c86a0dce38375eb41ae5c4ad79d8cd6754..f91fb7aabe7f3df4b744ea3d620fc2ae7308f9f8 100644 (file)
@@ -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_session *session, h2_stream *is,
 
 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);
 }