rpma_peer_cfg_delete(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

πŸ’– rpma_peer_cfg_delete(3) β€” RPMA Programmer's Manual πŸ’–

okay bestie, so this is a page from the RPMA Programmer's Manual and it's about one (1) little function that cleans up after you. short page, big responsibility. let's get into it 🫢


✨ NAME ✨

rpma_peer_cfg_delete β€” bestie, it deletes the peer configuration object. that's it. that's the whole job. it's giving cleanup crew energy 🧹✨


🌸 SYNOPSIS 🌸

#include <librpma.h>

struct rpma_peer_cfg;
int rpma_peer_cfg_delete(struct rpma_peer_cfg **pcfg_ptr);

yes ma'am, that's the whole include plus the struct plus the one function signature. copy it exactly, don't freestyle it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, rpma_peer_cfg_delete() deletes the peer configuration object. that's literally the description. no cap, no secret extra steps, no hidden lore. you made a peer config object at some point (hi rpma_peer_cfg_new(3), we see you πŸ‘€) and now you're done with it, so you hand it over here and it gets deleted. closure, but for memory. iconic.


πŸ’œ RETURN VALUE πŸ’œ

  • returns 0 on success 🌈
  • returns a negative error code on failure 😭

and hear me out on this one because it's lowkey important:

rpm_peer_cfg_delete() does not set *pcfg_ptr value to NULL on failure.

so like, if it fails, that pointer is not getting nulled for you. it is what it is. do not assume otherwise, bestie, or you will have a bad time fr fr πŸ’€


πŸŽ€ ERRORS πŸŽ€

rpma_peer_cfg_delete() can fail with the following error:

  • RPMA_E_INVAL β€” pcfg_ptr is NULL. like, there's nothing there. you handed it a void and it said "no thank you" πŸ™ˆ

🌈 SEE ALSO 🌈


okay that's the whole page, you're caught up, go forth and delete responsibly 🫢

this lil cutie came from the RPMA manual, dated 01 April 2024, and yes it's rpma_peer_cfg_delete(3) β€” same name up top and down here, we love a symmetrical moment πŸ’–βœ¨

πŸ“¦ where this page comes from