dplayx: Enclose NS_GetOtherMagic() in #if 0 since it's only used from code enclosed in #if 0.

Ismael Barros² razielmine at gmail.com
Wed May 13 08:50:08 CDT 2009


NS_GetOtherMagic is probably safe to remove.

NS_GetNsMagic was only used in some hackish code that tried to reverse
engineer dplay protocol. I removed that code that used it, but don't
know if it'll be needed in a future.


On Wed, May 13, 2009 at 12:10 PM, Kai Blin <kai.blin at gmail.com> wrote:
> On Wednesday 13 May 2009 10:38:08 Francois Gouget wrote:
>
> Personally I think we should just kill all that unused code and be done with
> it. Currently the only way to get a working dplay implementation is to use
> the native dlls anyway. Our version has been bit-rotting for quite some time.
>
> Cheers,
> Kai
>
>>  1) Remove this dead code altogether...
>
>
>>  2) Replace the #if 0 with an if (0) so that the function is 'used'
>>  3) Fix the code so it has neither #if 0 nor if (0) (which might be the
>>     same as option 1, I have no idea)
>>
>>
>>  dlls/dplayx/name_server.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/dlls/dplayx/name_server.c b/dlls/dplayx/name_server.c
>> index e6a6b62..a503270 100644
>> --- a/dlls/dplayx/name_server.c
>> +++ b/dlls/dplayx/name_server.c
>> @@ -183,6 +183,7 @@ DWORD NS_GetNsMagic( LPVOID lpNSInfo )
>>    return lpHdrInfo[1];
>>  }
>>
>> +#if 0
>>  /* Get the magic number associated with the non NS end */
>>  DWORD NS_GetOtherMagic( LPVOID lpNSInfo )
>>  {
>> @@ -190,6 +191,7 @@ DWORD NS_GetOtherMagic( LPVOID lpNSInfo )
>>
>>    return ((LPDWORD)lpCache->lpLocalAddrHdr)[1];
>>  }
>> +#endif
>>
>>  void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize )
>>  {
>
>
>
> --
> Kai Blin
> WorldForge developer  http://www.worldforge.org/
> Wine developer        http://wiki.winehq.org/KaiBlin
> Samba team member     http://www.samba.org/samba/team/
> --
> Will code for cotton.
>
>
>
>



More information about the wine-devel mailing list