MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / sk_delete

Function sk_delete

3rdparty/boringssl/crypto/stack/stack.c:193–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void *sk_delete(_STACK *sk, size_t where) {
194 void *ret;
195
196 if (!sk || where >= sk->num) {
197 return NULL;
198 }
199
200 ret = sk->data[where];
201
202 if (where != sk->num - 1) {
203 memmove(&sk->data[where], &sk->data[where + 1],
204 sizeof(void *) * (sk->num - where - 1));
205 }
206
207 sk->num--;
208 return ret;
209}
210
211void *sk_delete_ptr(_STACK *sk, void *p) {
212 size_t i;

Callers 3

sk_delete_ptrFunction · 0.85
sk_shiftFunction · 0.85
sk_popFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected