You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not think NULL should be used as an indication of an empty queue. There are only two possible outcomes of this function and they are already handled by the boolean return value: 1) an element is retrieved so the function returns `true`, or 2) the queue is empty so the function returns `false`.
This is to be safe with the interface. If for whatever reason a dynamically allocated error_out is passed and the queue is empty, you could have a memory leak if you set the pointer to NULL.
This is to be safe with the interface. If for whatever reason a dynamically allocated
error_out
is passed and the queue is empty, you could have a memory leak if you set the pointer to NULL.Originally posted by @d-loret in #46 (comment)
The text was updated successfully, but these errors were encountered: