! * \brief lstackRemove() * * \param[in] lstack * \return ptr to item popped from the top of the lstack, * or NULL if the lstack is empty or on error */
| 194 | * or NULL if the lstack is empty or on error |
| 195 | */ |
| 196 | void * |
| 197 | lstackRemove(L_STACK *lstack) |
| 198 | { |
| 199 | void *item; |
| 200 | |
| 201 | PROCNAME("lstackRemove"); |
| 202 | |
| 203 | if (!lstack) |
| 204 | return ERROR_PTR("lstack not defined", procName, NULL); |
| 205 | |
| 206 | if (lstack->n == 0) |
| 207 | return NULL; |
| 208 | |
| 209 | lstack->n--; |
| 210 | item = lstack->array[lstack->n]; |
| 211 | |
| 212 | return item; |
| 213 | } |
| 214 | |
| 215 | |
| 216 | /*! |
no outgoing calls
no test coverage detected