aboutsummaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-26 08:27:50 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-07-26 08:27:50 +0000
commitc373382c1edabd134c938e3c272ee40b5ee590b6 (patch)
tree934a209164285206461be81c86698d0c6172c83c /buffer.c
parentCompletely revamped the system for calling external programs and scripts: (diff)
downloadopenvpn-c373382c1edabd134c938e3c272ee40b5ee590b6.tar.xz
Fixed compiler warnings in Windows build (MinGW).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3125 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index b62d4b8..0fe9b61 100644
--- a/buffer.c
+++ b/buffer.c
@@ -35,9 +35,9 @@
size_t
array_mult_safe (const size_t m1, const size_t m2)
{
- const unsigned long long limit = 0xFFFFFFFF;
+ const size_t limit = 0xFFFFFFFF;
unsigned long long res = (unsigned long long)m1 * (unsigned long long)m2;
- if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > limit))
+ if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > (unsigned long long)limit))
msg (M_FATAL, "attemped allocation of excessively large array");
return (size_t) res;
}