QB_LIST_INIT(3)

✨ QB_LIST_INIT ✨

okay bestie, welcome to the libqb girlies' corner of the manual pages πŸ’… this one's from the libqb Programmer's Manual and it's literally the cutest lil baby function in the whole linked-list family. it's giving origin story. it's giving day one. let's get into it 🫢


🌸 NAME 🌸

qb_list_init β€” Initialize the list entry.

πŸŽ€ SYNOPSIS πŸŽ€

#include <qb/qblist.h>

static void qb_list_init(
    struct qb_list_head   *head   /* pointer to the list head */
);

πŸ¦‹ PARAMS πŸ¦‹

  • head β€” pointer to the list head. that's it. that's the whole assignment. one (1) pointer and she's ready πŸ’–

🌈 DESCRIPTION 🌈

Points next and prev pointers to head.

no cap, that's the entire vibe. you hand her a head, she points next and prev right back at that same head β€” a little self-love moment, a closed loop of one, the main character energy of data structures πŸ‘‘ every list has to start somewhere and this is where it starts, fr fr.

lowkey important: do this before you start adding stuff, otherwise your list is just a feral uninitialized pointer situation and that's not the vibe 😭

πŸ’œ STRUCTURES πŸ’œ

struct qb_list_head {
    struct   next;
    struct   prev;
};

the two lil members doing all the work. iconic honestly πŸŽ€

🌟 SEE ALSO 🌟

the whole squad, go say hi:

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


okay that's the page!! tysm for reading, you ate that πŸ“πŸ’…

sign-off szn: this lil masterpiece is from LIBQB, dated 2025-09-16, and it lives at QB_LIST_INIT(3) in case you need to find her again πŸ¦‹ mwah, go init something beautiful πŸ’œβœ¨

πŸ“¦ where this page comes from