Skip to content

Commit

Permalink
added some more assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
gpakosz committed Aug 13, 2013
1 parent 149907a commit 7eaa700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PackedArray.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ static void PackedArray_pack_reference(PackedArray* a, const uint32_t offset, co

assert(a != NULL);
assert(in != NULL);
assert(count != 0);

bitsPerItem = a->bitsPerItem;

Expand Down Expand Up @@ -721,6 +722,7 @@ static void PackedArray_unpack_reference(const PackedArray* a, const uint32_t of

assert(a != NULL);
assert(out != NULL);
assert(count != 0);

bitsPerItem = a->bitsPerItem;

Expand Down
2 changes: 2 additions & 0 deletions PackedArraySIMD.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ static void __PackedArray_pack_scalar(uint32_t* buffer, const uint32_t bitsPerIt

PACKEDARRAY_ASSERT(buffer != NULL);
PACKEDARRAY_ASSERT(in != NULL);
PACKEDARRAY_ASSERT(count != 0);

while (count--)
{
Expand Down Expand Up @@ -423,6 +424,7 @@ static void __PackedArray_unpack_scalar(const uint32_t* buffer, const uint32_t b

PACKEDARRAY_ASSERT(buffer != NULL);
PACKEDARRAY_ASSERT(out != NULL);
PACKEDARRAY_ASSERT(count != 0);

while (count--)
{
Expand Down

0 comments on commit 7eaa700

Please sign in to comment.