Chris
2024-05-23 21:40:59 UTC
Sorry, this is really a basic "programming in C 101" question.
But for the life of me, I'm not getting it. The source in
question:
LDAP *setup_ldap()
{
LDAP *ret;
int n;
if (debug) fprintf(stderr, "radldap: Setting up LDAP for %s, port %d\n",
host, port);
if (!(ret = ldap_init(host, port))) {
fprintf(stderr, "radldap: Could not initialize LDAP!\n");
_exit(2);
}
Now *you* can probably already see the problem. But this is what's returned:
radldap.c:302:12: error: incompatible integer to pointer conversion assigning
to 'LDAP *' (aka 'struct ldap *') from 'int' [-Wint-conversion]
302 | if (!(ret = ldap_init(host, port))) {
| ^ ~~~~~~~~~~~~~~~~~~~~~
Thanks in advance for any hints, or pointers.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
But for the life of me, I'm not getting it. The source in
question:
LDAP *setup_ldap()
{
LDAP *ret;
int n;
if (debug) fprintf(stderr, "radldap: Setting up LDAP for %s, port %d\n",
host, port);
if (!(ret = ldap_init(host, port))) {
fprintf(stderr, "radldap: Could not initialize LDAP!\n");
_exit(2);
}
Now *you* can probably already see the problem. But this is what's returned:
radldap.c:302:12: error: incompatible integer to pointer conversion assigning
to 'LDAP *' (aka 'struct ldap *') from 'int' [-Wint-conversion]
302 | if (!(ret = ldap_init(host, port))) {
| ^ ~~~~~~~~~~~~~~~~~~~~~
Thanks in advance for any hints, or pointers.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de