summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/fifobuf.c
diff options
context:
space:
mode:
authorRiza Sulistyo <riza@teluu.com>2013-06-19 06:47:43 +0000
committerRiza Sulistyo <riza@teluu.com>2013-06-19 06:47:43 +0000
commitd7aa4332dae06ae890053dd13239ddabee46b86c (patch)
tree34c599b317369bcc33827d5ee1200604a6599164 /pjlib/src/pj/fifobuf.c
parent7949b9e53b97281cfa4526ffe5cf7c7d887b7025 (diff)
Re #1680: Add initial support for Win64
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4537 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/fifobuf.c')
-rw-r--r--pjlib/src/pj/fifobuf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pjlib/src/pj/fifobuf.c b/pjlib/src/pj/fifobuf.c
index fe023d8f..565a9935 100644
--- a/pjlib/src/pj/fifobuf.c
+++ b/pjlib/src/pj/fifobuf.c
@@ -47,10 +47,10 @@ PJ_DEF(unsigned) pj_fifobuf_max_size (pj_fifobuf_t *fifobuf)
PJ_CHECK_STACK();
if (fifobuf->uend >= fifobuf->ubegin) {
- s1 = fifobuf->last - fifobuf->uend;
- s2 = fifobuf->ubegin - fifobuf->first;
+ s1 = (unsigned)(fifobuf->last - fifobuf->uend);
+ s2 = (unsigned)(fifobuf->ubegin - fifobuf->first);
} else {
- s1 = s2 = fifobuf->ubegin - fifobuf->uend;
+ s1 = s2 = (unsigned)(fifobuf->ubegin - fifobuf->uend);
}
return s1<s2 ? s2 : s1;
@@ -72,7 +72,7 @@ PJ_DEF(void*) pj_fifobuf_alloc (pj_fifobuf_t *fifobuf, unsigned size)
/* try to allocate from the end part of the fifo */
if (fifobuf->uend >= fifobuf->ubegin) {
- available = fifobuf->last - fifobuf->uend;
+ available = (unsigned)(fifobuf->last - fifobuf->uend);
if (available >= size+SZ) {
char *ptr = fifobuf->uend;
fifobuf->uend += (size+SZ);
@@ -92,7 +92,7 @@ PJ_DEF(void*) pj_fifobuf_alloc (pj_fifobuf_t *fifobuf, unsigned size)
/* try to allocate from the start part of the fifo */
start = (fifobuf->uend <= fifobuf->ubegin) ? fifobuf->uend : fifobuf->first;
- available = fifobuf->ubegin - start;
+ available = (unsigned)(fifobuf->ubegin - start);
if (available >= size+SZ) {
char *ptr = start;
fifobuf->uend = start + size + SZ;