]> git.corax.cc Git - mwm/commit
array: Make array_get() return an error if an element wasn't set
authorMatthias Kruk <m@m10k.eu>
Sun, 2 May 2021 11:39:05 +0000 (20:39 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 2 May 2021 11:39:05 +0000 (20:39 +0900)
commit8663f98b156ab3a9c146c418ed93e157da3e39a1
tree58e4edfa3afcbae5945729acf9fd73c74751677a
parenta072359bdedda144549f06aa5b2bef57e591b7cf
array: Make array_get() return an error if an element wasn't set

The array_get() function returns success when an entry is retrieved that
was never set. This makes it hard to distinguish uninitialized entries.
This commit changes array_get() to return an error if the caller is
attempting to retrieve an uninitialized entry.
array.c