wldap32: Remove superfluous const in ldap_init declarations.

Henri Verbeet hverbeet at gmail.com
Mon Oct 19 04:28:07 CDT 2015


On 19 October 2015 at 10:09, Hans Leidekker <hans at codeweavers.com> wrote:
> On Sun, 2015-10-18 at 11:08 +0200, Thomas Faber wrote:
>> diff --git a/dlls/wldap32/winldap_private.h b/dlls/wldap32/winldap_private.h
>> index a19ceb1..8596d1d 100644
>> --- a/dlls/wldap32/winldap_private.h
>> +++ b/dlls/wldap32/winldap_private.h
>> @@ -361,8 +361,8 @@ PCHAR * CDECL ldap_get_valuesA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR);
>>  PWCHAR * CDECL ldap_get_valuesW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR);
>>  PBERVAL * CDECL ldap_get_values_lenA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR);
>>  PBERVAL * CDECL ldap_get_values_lenW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR);
>> -WLDAP32_LDAP * CDECL ldap_initA(const PCHAR,ULONG);
>> -WLDAP32_LDAP * CDECL ldap_initW(const PWCHAR,ULONG);
>> +WLDAP32_LDAP * CDECL ldap_initA(PCHAR,ULONG);
>> +WLDAP32_LDAP * CDECL ldap_initW(PWCHAR,ULONG);
>
> You should make the implementation match the prototype instead.
>
The const does (almost) nothing. The intention may have been for these
to be "const char *" and "const WCHAR *", but that's not how typedefs
work. That's also one of the many reasons why pointer typedefs like
PCHAR and PWCHAR are usually best avoided.



More information about the wine-devel mailing list