[sheepdog] [PATCH v3 4/6] lib/fec: fix decode_prepare()
Liu Yuan
namei.unix at gmail.com
Fri Oct 18 20:34:24 CEST 2013
We should skip the null element from 'dp'. This fixes the problem that found
by tests/functional/076
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
lib/fec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/fec.c b/lib/fec.c
index f978ae0..1d60e8b 100644
--- a/lib/fec.c
+++ b/lib/fec.c
@@ -604,7 +604,8 @@ static inline void decode_prepare(struct fec *ctx, const uint8_t *dp[],
} else {
out[i] = dp[p];
outidx[i] = p;
- p++;
+ while (!dp[++p])
+ ;
}
}
}
--
1.7.9.5
More information about the sheepdog
mailing list