]> git.sur5r.net Git - openldap/commitdiff
Apply patches from Hallvard and others to remove lint.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 22 Nov 1998 22:38:18 +0000 (22:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 22 Nov 1998 22:38:18 +0000 (22:38 +0000)
clients/fax500/main.c
clients/fax500/rp500.c
clients/ud/edit.c
clients/ud/main.c
clients/ud/ud.h
clients/ud/util.c
libraries/liblber/etest.c
libraries/liblber/idtest.c
servers/slapd/tools/ldif2id2entry.c
servers/slurpd/proto-slurp.h
servers/slurpd/tsleep.c

index 66c3fecc6bb331907cde41a269fabe57a184ee0b..2e1131df4db1b8ed2b0ff431e967ed0fd7c5127c 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <ac/socket.h>
 #include <ac/string.h>
+#include <ac/ctype.h>
 #include <ac/syslog.h>
 #include <ac/time.h>
 #include <ac/wait.h>
index 5f02cc40e7edcd66aab6b8b080cce0db3063cf67..9b9c695d16a4d00ed238c268f2221012bcf99425 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "portable.h"
 
+#include <stdio.h>
 #include <stdlib.h>
 
 #include <ac/ctype.h>
index 88fe0b613a54c463b18bbee5c3d155d3537a3cc4..891f2e7c87c3b09247f509888ef26348fa7bb022 100644 (file)
@@ -187,7 +187,7 @@ load_editor( void )
        }
        else if (pid > 0) {
                /* parent - wait until the child proc is done editing */
-               void (*handler)();
+               RETSIGTYPE (*handler)();
                handler = SIGNAL(SIGINT, SIG_IGN);
                (void) wait(&status);
                (void) SIGNAL(SIGINT, handler);
index 83823f8a2f16de72648ee0885533caeeaf8c1f56..d22f3ab85baf28f41c5bdf5c335dc71f91ff1db2 100644 (file)
@@ -654,18 +654,13 @@ initialize_client( void )
 #ifndef NO_TERMCAP
        {
        char *term;
-       struct winsize win;                     /* for tty set-up */
 
        if (((term = getenv("TERM")) == NULL) || (tgetent(bp, term) <= 0))
                return;
        else {
 #ifdef TIOCGWINSZ
-               if (ioctl(fileno(stdout), TIOCGWINSZ, &win) < 0) {
-                       lpp = tgetnum("li");
-                       col_size = tgetnum("co");
-               } else
-#endif
-               {
+               struct winsize win;             /* for tty set-up */
+               if (ioctl(fileno(stdout), TIOCGWINSZ, &win) >= 0) {
                        if ((lpp = win.ws_row) == 0)
                                lpp = tgetnum("li");
                        if ((col_size = win.ws_col) == 0)
@@ -674,10 +669,14 @@ initialize_client( void )
                                lpp = DEFAULT_TTY_HEIGHT;
                        if ((col_size <= 0) || tgetflag("hc"))
                                col_size = DEFAULT_TTY_WIDTH;
+                       (void) SIGNAL (SIGWINCH, chwinsz);
+               } else
+#endif
+               {
+                       lpp = tgetnum("li");
+                       col_size = tgetnum("co");
                }
        }
-       (void) SIGNAL (SIGWINCH, chwinsz);
-
        }
 #endif
 }
index aeea56ae640c5b24d9e21c18c7e494258c75fd93..a5245479e3dce2eb64593a85c683ec221b1b4c0a 100644 (file)
@@ -230,7 +230,7 @@ void status LDAP_P(( void ));
 void change_base       LDAP_P(( int type, char **base, char *s ));
 void initialize_client LDAP_P(( void ));
 RETSIGTYPE  attn       LDAP_P(( int sig ));
-#ifndef NO_TERMCAP
+#if !defined(NO_TERMCAP) && defined(TIOCGWINSZ)
 RETSIGTYPE  chwinsz    LDAP_P(( int sig ));
 #endif
 
index 41a059d42579b7f18e10b4d2f49ee19c09ba6616..184cfc8fcc46d4d469e90bee4236dc77d3f7bd56 100644 (file)
@@ -578,7 +578,7 @@ Malloc( unsigned int size )
 void
 Free( void *ptr )
 {
-#ifndef STDC_HEADERS
+#if 0
        if (free(ptr) < 0) {
                perror("free");
                exit(-1);
index ca1acc742bcacc81422543ad60389b856cd0e72f..e46d506450834f864e30e5de5dc3e9f6a2415dbf 100644 (file)
@@ -23,6 +23,7 @@ static void usage( char *name )
        fprintf( stderr, "usage: %s fmtstring\n", name );
 }
 
+int
 main( int argc, char **argv )
 {
 #ifdef notdef
index a35e09826214a8e8c3e703ac532d3887e325400b..8d68fd603600c36b6601a3e317684ce8733ef6bf 100644 (file)
 #include <quipu/attr.h>
 #endif
 
-static usage( char *name )
-{
-       fprintf( stderr, "usage: %s\n", name );
-}
-
+int
 main( int argc, char **argv )
 {
 #ifdef HAVE_PSAP_H
index 226d8232db6dc4eb7a3621c4449876fce29a3bc7..e84ed64802673a30c627f9e0be6bbdeee476d0a2 100644 (file)
@@ -173,7 +173,8 @@ main( int argc, char **argv )
                                data.dsize = strlen( buf ) + 1;
                                if ( ldbm_store( db->dbc_db, key, data,
                                    LDBM_INSERT ) != 0 ) {
-                                       perror( "id2entry ldbm_store" );
+                                       fputs("id2entry ldbm_store failed\n",
+                                             stderr);
                                        exit( 1 );
                                }
                        }
index c697344028603784426a2c9f7b04fa2eac6ddb45..56e32829021be96de76a665d45dd22359e0dc05e 100644 (file)
@@ -60,7 +60,7 @@ int sanity    LDAP_P((void));
 int St_init    LDAP_P((St **st));
 
 /* tsleep.c */
-void tsleep    LDAP_P((time_t interval));
+int tsleep     LDAP_P((time_t interval));
 #if defined( HAVE_LWP )
 void start_lwp_scheduler LDAP_P(( void ));
 #endif
index abe606d02a04094b2c9d936172fd86899fe7c102..c21cf7def415030632a5b10d73d2717a08761006 100644 (file)
@@ -147,11 +147,12 @@ start_lwp_scheduler( void )
  * Here we assume we have fully preemptive threads, and that sleep()
  * does the right thing.
  */
-void
+int
 tsleep(
     time_t     interval
 )
 {
     sleep( interval );
+    return 0;
 }
 #endif /* !HAVE_LWP */