[sheepdog] [PATCH v2 UPDATE 4/4] lib/fec: fix decode_prepare()

Liu Yuan namei.unix at gmail.com
Thu Oct 17 20:08:50 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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fec.c b/lib/fec.c
index d5188b6..8877b68 100644
--- a/lib/fec.c
+++ b/lib/fec.c
@@ -604,7 +604,7 @@ static inline void decode_prepare(struct fec *ctx, const uint8_t *dp[],
 		} else {
 			out[i] = dp[p];
 			outidx[i] = p;
-			p++;
+			while(!dp[++p]); /* do nothing */
 		}
 	}
 }
-- 
1.7.9.5




More information about the sheepdog mailing list