Revision 9c853b96 gnuradio-core/src/lib/reed-solomon/init_rs.c
| b/gnuradio-core/src/lib/reed-solomon/init_rs.c | ||
|---|---|---|
| 34 | 34 |
void *INIT_RS(unsigned int symsize,unsigned int gfpoly,unsigned fcr,unsigned prim, |
| 35 | 35 |
unsigned int nroots){
|
| 36 | 36 |
struct rs *rs; |
| 37 |
int i, j, sr,root,iprim; |
|
| 37 |
int sr,root,iprim; |
|
| 38 |
unsigned int i, j; |
|
| 38 | 39 |
|
| 39 | 40 |
if(symsize > 8*sizeof(DTYPE)) |
| 40 | 41 |
return NULL; /* Need version with ints rather than chars */ |
| 41 | 42 |
|
| 42 |
if(fcr >= (1<<symsize)) |
|
| 43 |
if(fcr >= (1u<<symsize))
|
|
| 43 | 44 |
return NULL; |
| 44 |
if(prim == 0 || prim >= (1<<symsize)) |
|
| 45 |
if(prim == 0 || prim >= (1u<<symsize))
|
|
| 45 | 46 |
return NULL; |
| 46 |
if(nroots >= (1<<symsize)) |
|
| 47 |
if(nroots >= (1u<<symsize))
|
|
| 47 | 48 |
return NULL; /* Can't have more roots than symbol values! */ |
| 48 | 49 |
|
| 49 | 50 |
rs = (struct rs *)calloc(1,sizeof(struct rs)); |
Also available in: Unified diff