rem: if(iounit->AudioMode == AHI_INVALID_ID)
add: if(iounit->AudioMode == (ULONG) AHI_INVALID_ID)
context: ReadConfig ( struct AHIDevUnit *iounit,             struct AHIBase *AHIBase ){  struct IFFHandle *iff;  struct StoredProperty *prhd,*ahig;  struct CollectionItem *ci;  if(iounit)  {    /* Internal defaults for device unit */    iounit->AudioMode       = AHI_INVALID_ID;   // See at the end of the function!    iounit->Frequency       = 10000;    iounit->Channels        = 4;    iounit->MonitorVolume   = ~0;    iounit->InputGain       = ~0;    iounit->OutputVolume    = ~0;    iounit->Input           = ~0;    iounit->Output          = ~0;  }  else  {    /* Internal defaults for low-level mode */    AHIBase->ahib_AudioMode       = AHI_INVALID_ID;    AHIBase->ahib_Frequency       = 10000;    AHIBase->ahib_MonitorVolume   = 0x00000;    AHIBase->ahib_InputGain       = 0x10000;    AHIBase->ahib_OutputVolume    = 0x10000;    AHIBase->ahib_Input           = 0;    AHIBase->ahib_Output          = 0;  }  if((iff=AllocIFF()))  {    iff->iff_Stream=Open("ENV:Sys/ahi.prefs", MODE_OLDFILE);    if(iff->iff_Stream)    {      InitIFFasDOS(iff);      if(!OpenIFF(iff,IFFF_READ))      {        if(!(PropChunk(iff,ID_PREF,ID_PRHD)          || PropChunk(iff,ID_PREF,ID_AHIG)          || CollectionChunk(iff,ID_PREF,ID_AHIU)          || StopOnExit(iff,ID_PREF,ID_FORM)))        {          if(ParseIFF(iff,IFFPARSE_SCAN) == IFFERR_EOC)          {            prhd=FindProp(iff,ID_PREF,ID_PRHD);            ahig=FindProp(iff,ID_PREF,ID_AHIG);                        if(ahig)            {              struct AHIGlobalPrefs *globalprefs;                            globalprefs = (struct AHIGlobalPrefs *)ahig->sp_Data;              AHIBase->ahib_DebugLevel = globalprefs->ahigp_DebugLevel;              AHIBase->ahib_Flags = 0;	      /* Not used in version 5:	       * 	       * if(globalprefs->ahigp_DisableSurround)	       *   AHIBase->ahib_Flags |= AHIBF_NOSURROUND;	       *	       * if(globalprefs->ahigp_DisableEcho)               *   AHIBase->ahib_Flags |= AHIBF_NOECHO;	       *	       * if(globalprefs->ahigp_FastEcho)               *   AHIBase->ahib_Flags |= AHIBF_FASTECHO;	       *	       */	                    if( (ULONG) ahig->sp_Size > offsetof( struct AHIGlobalPrefs,                                                    ahigp_MaxCPU) )              {                AHIBase->ahib_MaxCPU = globalprefs->ahigp_MaxCPU;              }              else              {                AHIBase->ahib_MaxCPU = 0x10000 * 90 / 100;              }	      /* In version 5: Clipping is always used	       *               * if( (ULONG) ahig->sp_Size > offsetof( struct AHIGlobalPrefs,                *                                       ahigp_ClipMasterVolume) )               * {               *   if(globalprefs->ahigp_ClipMasterVolume)               *     AHIBase->ahib_Flags |= AHIBF_CLIPPING;               * }	       */              if( (ULONG) ahig->sp_Size > offsetof( struct AHIGlobalPrefs,                                                     ahigp_AntiClickTime ) )              {                AHIBase->ahib_AntiClickTime = globalprefs->ahigp_AntiClickTime;              }              else              {                AHIBase->ahib_AntiClickTime = 0;              }            }            ci=FindCollection(iff,ID_PREF,ID_AHIU);            while(ci)            {              struct AHIUnitPrefs *unitprefs;              unitprefs = (struct AHIUnitPrefs *)ci->ci_Data;              if(iounit)              {                if(unitprefs->ahiup_Unit == iounit->UnitNum)                {                  iounit->AudioMode       = unitprefs->ahiup_AudioMode;                  iounit->Frequency       = unitprefs->ahiup_Frequency;                  iounit->Channels        = unitprefs->ahiup_Channels;                  iounit->MonitorVolume   = unitprefs->ahiup_MonitorVolume;                  iounit->InputGain       = unitprefs->ahiup_InputGain;                  iounit->OutputVolume    = unitprefs->ahiup_OutputVolume;                  iounit->Input           = unitprefs->ahiup_Input;                  iounit->Output          = unitprefs->ahiup_Output;                }              }              else              {                if(unitprefs->ahiup_Unit == AHI_NO_UNIT)                {                  AHIBase->ahib_AudioMode       = unitprefs->ahiup_AudioMode;                  AHIBase->ahib_Frequency       = unitprefs->ahiup_Frequency;                  AHIBase->ahib_MonitorVolume   = unitprefs->ahiup_MonitorVolume;                  AHIBase->ahib_InputGain       = unitprefs->ahiup_InputGain;                  AHIBase->ahib_OutputVolume    = unitprefs->ahiup_OutputVolume;                  AHIBase->ahib_Input           = unitprefs->ahiup_Input;                  AHIBase->ahib_Output          = unitprefs->ahiup_Output;                }              }              ci=ci->ci_Next;            }          }        }        CloseIFF(iff);      }      Close(iff->iff_Stream);    }    FreeIFF(iff);  }  // Avoids calling AHI_BestAudioID if not neccessary (faster startup time,  // since doesn't open all sub libraries.  if(iounit)  {    if(iounit->AudioMode == AHI_INVALID_ID)    {      iounit->AudioMode = AHI_BestAudioID(AHIDB_Realtime, TRUE, TAG_DONE);    }  }  else  {    if(AHIBase->ahib_AudioMode == AHI_INVALID_ID)    {      AHIBase->ahib_AudioMode = AHI_BestAudioID( AHIDB_Realtime, TRUE, TAG_DONE);    }  }  return TRUE;}