Since shiftregs
is a pointer to an int
, *shiftregs
is an int
.
Since calloc
guarantees that the memory it allocates is set to 0
, and you've allocated enough memory to refer to shiftregs[0]
, l2index
will be 0
(assuming calloc
didn't fail and return NULL
).