QB_LIST_LENGTH(3)

✨ NAME ✨

qb_list_length β€” bestie, this one literally just counts how many items are in the list πŸ’–


🌸 SYNOPSIS 🌸

#include <qb/qblist.h>

static int32_t qb_list_length(
    struct qb_list_head   *head   /* the head for your list. */
);

okay so you pull in qb/qblist.h and then it's a static int32_t function called qb_list_length, and it takes exactly one thing: head. that's it. that's the whole vibe πŸŽ€


πŸ¦‹ PARAMS πŸ¦‹

  • head β€” the head for your list. that's the entry point, the main character, the one you hand over so she can go count πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

ngl the original page doesn't drop any extra prose here β€” it goes straight into showing you the struct. so no hidden lore, bestie, just the shape of the thing πŸ‘‡

πŸŽ€ STRUCTURES πŸŽ€

struct qb_list_head {
    struct   next;
    struct   prev;
};

that's the head struct, character for character. two members: next and prev. lowkey iconic in its minimalism ✨


🌈 RETURN VALUE 🌈

the length of the list. that's it. no cap, it just tells you how many items are chillin' in there πŸ’―


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” go read these too:


Copyright (C) 2010-2020 Red Hat, Inc.


and that's the whole page, bestie 🫢 this was QB_LIST_LENGTH(3) from the libqb Programmer's Manual, brought to you by the LIBQB girlies, dated 2025-09-16. mwah πŸ’‹ slay, go count your list βœ¨πŸ‘‘

πŸ“¦ where this page comes from