Remove redundant check.
[wine] / dlls / wldap32 / control.c
1 /*
2  * WLDAP32 - LDAP support for Wine
3  *
4  * Copyright 2005 Hans Leidekker
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22
23 #include "wine/port.h"
24 #include "wine/debug.h"
25
26 #include <stdarg.h>
27
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winnls.h"
31
32 #ifdef HAVE_LDAP_H
33 #include <ldap.h>
34 #else
35 #define LDAP_SUCCESS        0x00
36 #define LDAP_NOT_SUPPORTED  0x5c
37 #endif
38
39 #include "winldap_private.h"
40 #include "wldap32.h"
41
42 WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
43
44 ULONG ldap_control_freeA( LDAPControlA *control )
45 {
46     ULONG ret = LDAP_SUCCESS;
47 #ifdef HAVE_LDAP
48
49     TRACE( "(%p)\n", control );
50     controlfreeA( control );
51
52 #endif
53     return ret;
54 }
55
56 ULONG ldap_control_freeW( LDAPControlW *control )
57 {
58     ULONG ret = LDAP_SUCCESS;
59 #ifdef HAVE_LDAP
60
61     TRACE( "(%p)\n", control );
62     controlfreeW( control );
63
64 #endif
65     return ret;
66 }
67
68 ULONG ldap_controls_freeA( LDAPControlA **controls )
69 {
70     ULONG ret = LDAP_SUCCESS;
71 #ifdef HAVE_LDAP
72
73     TRACE( "(%p)\n", controls );
74     controlarrayfreeA( controls );
75
76 #endif
77     return ret;
78 }
79
80 ULONG ldap_controls_freeW( LDAPControlW **controls )
81 {
82     ULONG ret = LDAP_SUCCESS;
83 #ifdef HAVE_LDAP
84
85     TRACE( "(%p)\n", controls );
86     controlarrayfreeW( controls );
87
88 #endif
89     return ret;
90 }
91
92 ULONG ldap_free_controlsA( LDAPControlA **controls )
93 {
94     return ldap_controls_freeA( controls );
95 }
96
97 ULONG ldap_free_controlsW( LDAPControlW **controls )
98 {
99     return ldap_controls_freeW( controls );
100 }