projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7565af2
)
vss.c: Get rid of some casts.
author
Andre Noll
<maan@systemlinux.org>
Sat, 28 Feb 2009 14:09:13 +0000
(15:09 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 28 Feb 2009 14:09:13 +0000
(15:09 +0100)
vss.c
patch
|
blob
|
history
diff --git
a/vss.c
b/vss.c
index 0801eeb089b05bf3e0f47aad86d953f5ecc4dee0..330bba6ab65c397b19bc1a25d9310bd15bcec70e 100644
(file)
--- a/
vss.c
+++ b/
vss.c
@@
-139,19
+139,19
@@
static void setup_fec_group(struct fec_client *fc, struct vss_task *vsst)
{
uint32_t num_bytes = 0, chunk_num, max_group_size, last_payload_size;
int i, k = fc->fcp->data_slices_per_group;
{
uint32_t num_bytes = 0, chunk_num, max_group_size, last_payload_size;
int i, k = fc->fcp->data_slices_per_group;
- const
unsigned
char *start_buf = NULL;
+ const char *start_buf = NULL;
struct timeval tmp, *chunk_tv = vss_chunk_time();
assert(chunk_tv);
max_group_size = (fc->fcp->max_slice_bytes - FEC_HEADER_SIZE) * k;
chunk_num = fc->group.first_chunk;
for (;;) {
struct timeval tmp, *chunk_tv = vss_chunk_time();
assert(chunk_tv);
max_group_size = (fc->fcp->max_slice_bytes - FEC_HEADER_SIZE) * k;
chunk_num = fc->group.first_chunk;
for (;;) {
- const
unsigned
char *buf;
+ const char *buf;
size_t len;
if (chunk_num >= mmd->afd.afhi.chunks_total)
break;
size_t len;
if (chunk_num >= mmd->afd.afhi.chunks_total)
break;
- afh_get_chunk(chunk_num, &mmd->afd.afhi, vsst->map,
(const char **)
&buf, &len);
+ afh_get_chunk(chunk_num, &mmd->afd.afhi, vsst->map, &buf, &len);
if (!start_buf)
start_buf = buf;
if (num_bytes + len > max_group_size)
if (!start_buf)
start_buf = buf;
if (num_bytes + len > max_group_size)
@@
-179,9
+179,10
@@
static void setup_fec_group(struct fec_client *fc, struct vss_task *vsst)
&fc->group.slice_duration);
for (i = 0; i < k; i++)
&fc->group.slice_duration);
for (i = 0; i < k; i++)
- fc->src_data[i] = start_buf + i * fc->slice.bytes;
+ fc->src_data[i] = (const unsigned char *)start_buf
+ + i * fc->slice.bytes;
- if (
(char *)
start_buf + k * fc->slice.bytes > vsst->map + mmd->size) {
+ if (start_buf + k * fc->slice.bytes > vsst->map + mmd->size) {
/* can not use last slice as it goes beyond the map */
if (fc->extra_src_buf_size < fc->slice.bytes)
fc->extra_src_buf = para_realloc(fc->extra_src_buf, fc->slice.bytes);
/* can not use last slice as it goes beyond the map */
if (fc->extra_src_buf_size < fc->slice.bytes)
fc->extra_src_buf = para_realloc(fc->extra_src_buf, fc->slice.bytes);