Skip to content
Snippets Groups Projects
Commit da8a617d authored by Sean Bright's avatar Sean Bright Committed by Joshua Colp
Browse files

vector.h: Fix implementation of AST_VECTOR_COMPACT() for empty vectors

The assumed behavior of realloc() - that it was effectively a free() if
its second argument was 0 - is Linux specific behavior and is not
guaranteed by either POSIX or the C specification.

Instead, if we want to resize a vector to 0, do it explicitly.

Change-Id: Ife31d4b510ebab41cb5477fdc7ea4e3138ca8b4f
parent 6482ab5b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment