Join Nostr
2026-05-21 18:18:55 UTC

sarah tonin :wlfBlep: on Nostr: ok so when i am trying to insert into a buffer that is already full (or to remove ...

ok so when i am trying to insert into a buffer that is already full (or to remove from one that is already empty), should set errno to ENOSPC, ENOMEM or ENOBUFS ? i have seen all three being used and i'm unsure which one is the most correct

i mean ENOSPC explicitly states "No space left on device", but i'm unsure what device means here, and ENOMEM just says "Not enough space" which ? may you be a little more descriptive ?

i'm tempted to go with ENOBUFS ("No buffer space available"), but i wonder if there is a consensus here