• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: memset AND struct = {0}?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memset AND struct = {0}?


  • Subject: Re: memset AND struct = {0}?
  • From: Chris Adamson <email@hidden>
  • Date: Sun, 01 Mar 2015 20:44:10 -0500

Yeah, you’re right, the memset() is unnecessary there. I used to use memset() a lot, Kevin used the {0}. Sooner or later we were bound to collide.

—Chris

> On Mar 1, 2015, at 8:27 PM, Patrick J. Collins <email@hidden> wrote:
>
> This "learning core audio" book I am reading shows:
>
> AudioStreamBasicDescription recordFormat = {0};
> memset(&recordFormat, 0, sizeof(recordFormat));
>
> Is the memset actually doing anything?  Isn't the line with the = {0},
> going to zero out all the data?  Should I be doing memset with all my
> asbd's?
>
> Patrick J. Collins
> http://collinatorstudios.com
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >memset AND struct = {0}? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: memset AND struct = {0}?
  • Next by Date: Re: memset AND struct = {0}?
  • Previous by thread: memset AND struct = {0}?
  • Next by thread: Re: memset AND struct = {0}?
  • Index(es):
    • Date
    • Thread