From b1639dadd64cd24779a0ee2cc03c6028a4b1f7a3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 13 Dec 1999 04:53:59 +0000 Subject: [PATCH] Remove lint Add copyrights --- build/build.dsp | 4 ++++ build/main.dsw | 18 ++++++++++++++++++ clients/ud/auth.c | 4 ++++ clients/ud/edit.c | 4 ++++ clients/ud/find.c | 4 ++++ clients/ud/globals.c | 4 ++++ clients/ud/group.c | 4 ++++ clients/ud/help.c | 4 ++++ clients/ud/mod.c | 4 ++++ clients/ud/print.c | 4 ++++ clients/ud/string_to_key.c | 4 ++++ clients/ud/ud.h | 9 ++------- clients/ud/util.c | 4 ++++ include/lber.h | 2 +- include/lutil.h | 4 ++-- libraries/libavl/testavl.c | 4 ++++ libraries/liblber/bprint.c | 3 --- libraries/liblber/decode.c | 3 --- libraries/liblber/encode.c | 3 --- libraries/liblber/io.c | 3 --- libraries/liblber/memory.c | 3 --- libraries/liblber/options.c | 3 --- libraries/liblber/sockbuf.c | 3 --- libraries/liblutil/entropy.c | 5 ++--- libraries/liblutil/passwd.c | 2 +- servers/slapd/back-ldbm/passwd.c | 2 +- servers/slapd/daemon.c | 4 ---- 27 files changed, 75 insertions(+), 40 deletions(-) diff --git a/build/build.dsp b/build/build.dsp index 19d34394fc..3103133c2c 100644 --- a/build/build.dsp +++ b/build/build.dsp @@ -164,5 +164,9 @@ CFG=build - Win32 DLL Debug !ENDIF +# Begin Source File + +SOURCE=.\build.mak +# End Source File # End Target # End Project diff --git a/build/main.dsw b/build/main.dsw index 869136a6bd..5a1ba55ede 100644 --- a/build/main.dsw +++ b/build/main.dsw @@ -356,6 +356,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### @@ -368,6 +371,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### @@ -380,6 +386,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### @@ -392,6 +401,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### @@ -404,6 +416,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### @@ -416,6 +431,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name setup + End Project Dependency }}} ############################################################################### diff --git a/clients/ud/auth.c b/clients/ud/auth.c index 31853e7c5d..22da8e6901 100644 --- a/clients/ud/auth.c +++ b/clients/ud/auth.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1991, 1992 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/edit.c b/clients/ud/edit.c index 003ff60abf..a6367d7909 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1994 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/find.c b/clients/ud/find.c index 5e8b865603..5efa57f194 100644 --- a/clients/ud/find.c +++ b/clients/ud/find.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1991, 1992, 1993 * Regents of the University of Michigan. All rights reserved. diff --git a/clients/ud/globals.c b/clients/ud/globals.c index e37ce10fe5..c08cda10b2 100644 --- a/clients/ud/globals.c +++ b/clients/ud/globals.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1992, 1993, 1994 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/group.c b/clients/ud/group.c index 9a2f283a3d..16a0b6d0fe 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1993, 1994 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/help.c b/clients/ud/help.c index 027e168e41..94a885792e 100644 --- a/clients/ud/help.c +++ b/clients/ud/help.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1992, 1993 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/mod.c b/clients/ud/mod.c index 40eea36316..759f3f0943 100644 --- a/clients/ud/mod.c +++ b/clients/ud/mod.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1991,1993 Regents of the University of Michigan. * All rights reserved. diff --git a/clients/ud/print.c b/clients/ud/print.c index 0320c9f978..1b3a50de7b 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1991, 1993 * Regents of the University of Michigan. All rights reserved. diff --git a/clients/ud/string_to_key.c b/clients/ud/string_to_key.c index 0ed375e924..7431c35f92 100644 --- a/clients/ud/string_to_key.c +++ b/clients/ud/string_to_key.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ #include "portable.h" #if defined(HAVE_KERBEROS) && !defined(openbsd) diff --git a/clients/ud/ud.h b/clients/ud/ud.h index fa07c3531d..a6d15f25de 100644 --- a/clients/ud/ud.h +++ b/clients/ud/ud.h @@ -1,12 +1,7 @@ /* $OpenLDAP$ */ /* - * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted only - * as authorized by the OpenLDAP Public License. A copy of this - * license is available at http://www.OpenLDAP.org/license.html or - * in file LICENSE in the top-level directory of the distribution. + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* * Copyright (c) 1991, 1992, 1993 diff --git a/clients/ud/util.c b/clients/ud/util.c index 24bc11c6e5..d97d8c0c5f 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -1,4 +1,8 @@ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ /* * Copyright (c) 1992, 1993 Regents of the University of Michigan. * All rights reserved. diff --git a/include/lber.h b/include/lber.h index d85ec9f38b..be36e58bb4 100644 --- a/include/lber.h +++ b/include/lber.h @@ -88,7 +88,7 @@ typedef int (*BERTranslateProc) LDAP_P(( /* LBER BerElement options */ #define LBER_USE_DER 0x01 #define LBER_USE_INDEFINITE_LEN 0x02 -#define LBER_TRANSLATE_STRINGS 0x04 +#define LBER_TRANSLATE_STRINGS 0x04 /* deprecated */ /* get/set options for BerElement */ #define LBER_OPT_BER_OPTIONS 0x01 diff --git a/include/lutil.h b/include/lutil.h index 9e6336d840..230167b876 100644 --- a/include/lutil.h +++ b/include/lutil.h @@ -53,7 +53,7 @@ lutil_detach LDAP_P(( LIBLUTIL_F( int ) lutil_entropy LDAP_P(( char *buf, - int nbytes )); + ber_len_t nbytes )); /* passwd.c */ struct berval; /* avoid pulling in lber.h */ @@ -65,7 +65,7 @@ lutil_passwd LDAP_P(( const char **methods )); LIBLUTIL_F( struct berval * ) -lutil_passwd_generate LDAP_P(( int )); +lutil_passwd_generate LDAP_P(( ber_len_t )); LIBLUTIL_F( struct berval * ) lutil_passwd_hash LDAP_P(( diff --git a/libraries/libavl/testavl.c b/libraries/libavl/testavl.c index 94540c304d..1f716eacaf 100644 --- a/libraries/libavl/testavl.c +++ b/libraries/libavl/testavl.c @@ -1,5 +1,9 @@ /* testavl.c - Test Tim Howes AVL code */ /* $OpenLDAP$ */ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ #include "portable.h" diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index 6e347da2eb..5c615a1291 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -12,9 +12,6 @@ #include #include -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" /* diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 57d33b9e54..94a1c6ea14 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -26,9 +26,6 @@ #include #include -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" static ber_len_t ber_getnint LDAP_P(( diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 3003ddb330..0b7fb7494e 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -26,9 +26,6 @@ #include #include -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" static int ber_put_len LDAP_P(( diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index c5dc98f3a1..96b02ad861 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -32,9 +32,6 @@ #include #endif -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" static ber_slen_t BerRead LDAP_P(( diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index 5e1719ca68..d45a09d0ad 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -8,9 +8,6 @@ #include #include -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" #if LDAP_MEMORY_DEBUG diff --git a/libraries/liblber/options.c b/libraries/liblber/options.c index 811867810d..03a4e3c56a 100644 --- a/libraries/liblber/options.c +++ b/libraries/liblber/options.c @@ -8,9 +8,6 @@ #include #include -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" struct lber_options ber_int_options = { diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index 976f9aa56b..5bdce3efbc 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -27,9 +27,6 @@ #include #endif -#undef LDAP_F_PRE -#define LDAP_F_PRE LDAP_F_EXPORT - #include "lber-int.h" #ifdef LDAP_TEST diff --git a/libraries/liblutil/entropy.c b/libraries/liblutil/entropy.c index b7867839cf..6b7c6c9552 100644 --- a/libraries/liblutil/entropy.c +++ b/libraries/liblutil/entropy.c @@ -33,9 +33,8 @@ * This routinue should be extended to support additional sources * of entropy. */ -int lutil_entropy( char *buf, int nbytes ) +int lutil_entropy( char *buf, ber_len_t nbytes ) { - if( nbytes < 0 ) return -1; if( nbytes == 0 ) return 0; #ifdef URANDOM_DEVICE @@ -91,7 +90,7 @@ int lutil_entropy( char *buf, int nbytes ) * access to this counter may not be atomic. */ static int counter = 0; - int n; + ber_len_t n; struct rdata_s { int counter; diff --git a/libraries/liblutil/passwd.c b/libraries/liblutil/passwd.c index c610c2bd10..7481780025 100644 --- a/libraries/liblutil/passwd.c +++ b/libraries/liblutil/passwd.c @@ -250,7 +250,7 @@ lutil_passwd( } -struct berval * lutil_passwd_generate( int len ) +struct berval * lutil_passwd_generate( ber_len_t len ) { struct berval *pw; diff --git a/servers/slapd/back-ldbm/passwd.c b/servers/slapd/back-ldbm/passwd.c index 7ab5e18766..85bbed01b4 100644 --- a/servers/slapd/back-ldbm/passwd.c +++ b/servers/slapd/back-ldbm/passwd.c @@ -76,7 +76,7 @@ ldbm_back_exop_passwd( Debug( LDAP_DEBUG_TRACE, "passwd: \"%s\"%s\n", dn, id ? " (proxy)" : "", 0 ); - if( dn == NULL || dn[0] == NULL ) { + if( dn == NULL || dn[0] == '\0' ) { *text = ch_strdup("No password is associated with the Root DSE"); rc = LDAP_OPERATIONS_ERROR; goto done; diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index bcae0d3fb6..56c0afe37e 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -335,10 +335,6 @@ int slapd_daemon_init( char *urls ) int i, rc; char **u; -#ifndef HAVE_TLS - assert( tls_port == 0 ); -#endif - Debug( LDAP_DEBUG_ARGS, "daemon_init: %s\n", urls ? urls : "", 0, 0 ); -- 2.39.5