range_is_zero(9)
β¨ range_is_zero(9) β¨
okay so bestie, welcome to the Kernel API Manual π β this one's a tiny little function with a huge personality, and we're gonna get into it. no cap. π
π NAME π
range_is_zero β test whether buffer is initialized πΈ
like, that's the whole vibe check right there. it checks a buffer. that's it. that's the function. π¦
β SYNOPSIS β
bool range_is_zero (void *buf , size_t from , size_t to );
literally just three args and a bool coming back at you. iconic signature, no notes. π
π§ ARGUMENTS π§
bufβ the buffer we're checking, bestie. the main character of this whole operation. π«Άfromβ start checking from this position, like, right here. πtoβ check up until (excluding!) this position. sotois not invited to the party, it's just where the party ends. π
π₯ DESCRIPTION π₯
so the way this works: this function returns true if there is a non-zero byte in buf in the range [from,to). π
that's it. that's the tea. a non-zero byte shows up in that range and you get true back. periodt. β¨
also bestie, notice the little)aftertoin[from,to)β that bracket is doing something.fromis included,tois not. iykyk. π
π SEE ALSO π
- Kernel file
./net/bpf/test_run.cβ go read it, it's giving source-of-truth energy. π
and that's the page, bestie!! π this one lives in ./net/bpf (that's the source, mwah π) and the version snuck in a little date of October 2026 β so yeah, she's future-dated and she knows it. β slay, go check those buffers. π₯π§ββοΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms