X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fec.c;h=932e0693e3786fc28b5a180428a9b296534a1fd5;hb=2934ee80367ee9d50b99ed8d7f672d1a397b4ce0;hp=ce2bc4fd729042261d1c3349647df55cf7d28117;hpb=26a032fffa6c6e6f092ed3d14c2b5f08e5c736d6;p=paraslash.git diff --git a/fec.c b/fec.c index ce2bc4fd..932e0693 100644 --- a/fec.c +++ b/fec.c @@ -97,7 +97,7 @@ static void init_mul_table(void) static unsigned char *alloc_matrix(int rows, int cols) { - return alloc(rows * cols); + return arr_alloc(rows, cols); } /* @@ -245,9 +245,9 @@ static void matmul(unsigned char *a, unsigned char *b, unsigned char *c, static int invert_mat(unsigned char *src, int k) { int irow, icol, row, col, ix, error; - int *indxc = alloc(k * sizeof(int)); - int *indxr = alloc(k * sizeof(int)); - int *ipiv = alloc(k * sizeof(int)); /* elements used as pivots */ + int *indxc = arr_alloc(k, sizeof(int)); + int *indxr = arr_alloc(k, sizeof(int)); + int *ipiv = arr_alloc(k, sizeof(int)); /* elements used as pivots */ unsigned char c, *p, *id_row = alloc_matrix(1, k), *temp_row = alloc_matrix(1, k); @@ -607,7 +607,7 @@ int fec_decode(struct fec_parms *parms, unsigned char **data, int *idx, if (ret < 0) return ret; /* do the actual decoding */ - slice = alloc(k * sizeof(unsigned char *)); + slice = arr_alloc(k, sizeof(unsigned char *)); for (row = 0; row < k; row++) { if (idx[row] >= k) { slice[row] = zalloc(sz);