CVS update: samba/source/libads
Andrew Bartlett
abartlet at samba.org
Thu Jun 27 06:45:53 EST 2002
"Jim McDonough (IBM)" wrote:
>
> Date: Wed Jun 26 10:27:30 2002
> Author: jmcd
>
> Update of /home/cvs/samba/source/libads
> In directory va:/tmp/cvs-serv4513/libads
>
> Modified Files:
> ldap.c
> Log Message:
> Reduce compiler warnings.
>
> Revisions:
> ldap.c 1.59 => 1.60
> http://www.samba.org/cgi-bin/cvsweb/samba/source/libads/ldap.c?r1=1.59&r2=1.60
This is not the way to do it.
If 'push_utf8_allocate()' fails, then we have bigger problems - so just
clean up and fail at that point. Don't try to be smart and set the
value anyway.
Also, C has a 'uncostifiy' function already: strdup(). I am really not
convinced that casting to a void* makes the solution any more clear.
Remember, C warnings are not 'a thing to be got rid of', but a tool to
help you find more fundemental flaws in your program. Use them - they
really are there to help you.
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba-cvs
mailing list