MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / algorithm_end

Function algorithm_end

algorithm/algorithm.c:2239–2242  ·  view source on GitHub ↗

* @brief Returns a pointer to one past the last element of an array. * * @param base Pointer to the start of the array. * @param num Number of elements in the array. * @param size Size of each element in bytes. * @return Pointer to one past the last element of the array. */

Source from the content-addressed store, hash-verified

2237 if (!first || !last || !result || !pred || size == 0) {
2238 return;
2239 }
2240 if ((const char *)last <= (const char *)first) {
2241 return;
2242 }
2243 /* the filter core: predicate answers collected 64 at a time, then only
2244 the kept elements copied - no branch mispredictions on random data */
2245 size_t n = (size_t)((const char *)last - (const char *)first) / size;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected