Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by badc0ffee

2 months ago

You could always `bzero` or `memset` the entire struct to 0.

1 comment

badc0ffee

Reply

trinix912  2 months ago

But only if it contains strictly POD members, otherwise it's UB.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities