X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fec.c;h=2301cc8d2d4653b8bc82a8bcc46b5867b5d7af14;hp=e5c2a3b83e005c8596e6bcf951702bc3cb2cf5e1;hb=3150a0caa27a34d44556fb77f4a5aebc3d978580;hpb=3923f936294f9f900dc8c6a1c0fe84f0e2852dca diff --git a/fec.c b/fec.c index e5c2a3b8..2301cc8d 100644 --- a/fec.c +++ b/fec.c @@ -182,11 +182,15 @@ static void generate_gf(void) static void addmul(unsigned char *dst1, const unsigned char *src1, unsigned char c, int sz) { + unsigned char *dst, *lim, *col; + const unsigned char *src = src1; + if (c == 0) return; - unsigned char *dst = dst1, *lim = &dst[sz - UNROLL + 1], - *col = gf_mul_table[c]; - const unsigned char *src = src1; + + dst = dst1; + lim = &dst[sz - UNROLL + 1]; + col = gf_mul_table[c]; for (; dst < lim; dst += UNROLL, src += UNROLL) { dst[0] ^= col[src[0]];