diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-20 03:33:06 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-08-20 03:33:06 +0300 |
commit | dc9b8dce309728b47059b9b44fd3bbd3798667ae (patch) | |
tree | 01b520be14874d4924df4518f43d7d24fc67a4dd /src/modules/module-oss.c | |
parent | a3e57da0f0c12a5d7de2e731514884a51b4b83f9 (diff) |
add a few missing casts
Diffstat (limited to 'src/modules/module-oss.c')
-rw-r--r-- | src/modules/module-oss.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c index 3333eb83..23a32549 100644 --- a/src/modules/module-oss.c +++ b/src/modules/module-oss.c @@ -899,7 +899,7 @@ static void thread_func(void *userdata) { ssize_t l; pa_bool_t loop = FALSE, work_done = FALSE; - l = u->out_fragment_size; + l = (ssize_t) u->out_fragment_size; if (u->use_getospace) { audio_buf_info info; @@ -920,14 +920,14 @@ static void thread_func(void *userdata) { /* Round down to multiples of the fragment size, * because OSS needs that (at least some versions * do) */ - l = (l/u->out_fragment_size) * u->out_fragment_size; + l = (l/(ssize_t) u->out_fragment_size) * (ssize_t) u->out_fragment_size; /* Hmm, so poll() signalled us that we can read * something, but GETOSPACE told us there was nothing? * Hmm, make the best of it, try to read some data, to * avoid spinning forever. */ if (l <= 0 && (revents & POLLOUT)) { - l = u->out_fragment_size; + l = (ssize_t) u->out_fragment_size; loop = FALSE; } @@ -1010,7 +1010,7 @@ static void thread_func(void *userdata) { pa_memchunk memchunk; pa_bool_t loop = FALSE, work_done = FALSE; - l = u->in_fragment_size; + l = (ssize_t) u->in_fragment_size; if (u->use_getispace) { audio_buf_info info; @@ -1024,10 +1024,10 @@ static void thread_func(void *userdata) { } } - l = (l/u->in_fragment_size) * u->in_fragment_size; + l = (l/(ssize_t) u->in_fragment_size) * (ssize_t) u->in_fragment_size; if (l <= 0 && (revents & POLLIN)) { - l = u->in_fragment_size; + l = (ssize_t) u->in_fragment_size; loop = FALSE; } |