Remove lint in UserDirectory found on NT

This commit is contained in:
Kurt Zeilenga 1998-11-18 20:08:02 +00:00
parent 8be224a80e
commit 2a0715d947
6 changed files with 37 additions and 18 deletions

View file

@ -114,10 +114,11 @@ load_editor( void )
FILE *fp;
char *cp, *editor = UD_DEFAULT_EDITOR;
static char template[MED_BUF_SIZE];
#ifndef HAVE_SPAWNLP
int pid;
int status;
#endif
int rc;
void (*handler)();
#ifdef DEBUG
if (debug & D_TRACE)
@ -186,6 +187,7 @@ load_editor( void )
}
else if (pid > 0) {
/* parent - wait until the child proc is done editing */
void (*handler)();
handler = SIGNAL(SIGINT, SIG_IGN);
(void) wait(&status);
(void) SIGNAL(SIGINT, handler);
@ -204,8 +206,12 @@ print_attrs_and_values( FILE *fp, struct attribute *attrs, short int flag )
register int i, j;
for (i = 0; attrs[i].quipu_name != NULL; i++) {
if (!modifiable(attrs[i].quipu_name, flag|ATTR_FLAG_MAY_EDIT))
if (!modifiable(attrs[i].quipu_name,
(short) (flag|ATTR_FLAG_MAY_EDIT)))
{
continue;
}
fprintf(fp, "%s\n", attrs[i].quipu_name);
if ( attrs[i].number_of_values > MAX_VALUES ) {
printf(" The %s attribute has more than %d values.\n",

View file

@ -20,6 +20,10 @@
#include <ac/time.h>
#include <ac/unistd.h>
#ifdef HAVE_IO_H
#include <io.h>
#endif
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
@ -31,7 +35,7 @@ static char * bind_and_fetch(char *name);
void
add_group( char *name )
{
register int i, idx = 0, prompt = 0;
int idx = 0, prompt = 0;
char tmp[BUFSIZ], dn[BUFSIZ];
static LDAPMod *attrs[9];
LDAPMod init_rdn, init_owner, init_domain,
@ -152,9 +156,9 @@ add_group( char *name )
#ifdef DEBUG
if (debug & D_GROUPS) {
register LDAPMod **lpp;
register char **cpp;
register int j;
LDAPMod **lpp;
char **cpp;
int i, j;
printf(" About to call ldap_add()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", dn);
@ -728,7 +732,6 @@ mod_addrDN( char *group, int offset )
{
char s[BUFSIZ], *new_value /* was member */, *values[2];
char attrtype[ 64 ];
int i;
LDAPMod mod, *mods[2];
LDAPMessage *mp;
@ -867,7 +870,7 @@ mod_addrDN( char *group, int offset )
* "Bryan Beecher" <bryan@umich.edu>
* Bryan Beecher <bryan@umich.edu>
*/
register char *cp;
char *cp;
if (strchr(s, '<') == NULL) {
for (cp = s; *cp != '@'; cp++)
if (isspace(*cp))
@ -895,9 +898,9 @@ mod_addrDN( char *group, int offset )
#ifdef DEBUG
if (debug & D_GROUPS) {
register LDAPMod **lpp;
register char **cp;
register int i, j;
LDAPMod **lpp;
char **cp;
int i, j;
printf(" About to call ldap_modify_s()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", group);
@ -954,9 +957,9 @@ mod_addrDN( char *group, int offset )
mod.mod_op = LDAP_MOD_DELETE;
#ifdef DEBUG
if (debug & D_GROUPS) {
register LDAPMod **lpp;
register char **cp;
register int i, j;
LDAPMod **lpp;
char **cp;
int i, j;
printf(" About to call ldap_modify_s()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", group);

View file

@ -158,6 +158,8 @@ main( int argc, char **argv )
/* now tackle the user's commands */
do_commands();
/* NOTREACHED */
return 0;
}
void
@ -283,7 +285,6 @@ void
status( void )
{
register char **rdns;
char *host;
#ifdef DEBUG
if (debug & D_TRACE)
@ -537,9 +538,10 @@ initialize_client( void )
{
FILE *fp; /* for config file */
static char buffer[MED_BUF_SIZE]; /* for input */
#ifdef HAVE_GETPWUID
struct passwd *pw; /* for getting the home dir */
#endif
register char *cp; /* for fiddling with buffer */
char *term; /* for tty set-up */
char *config; /* config file to use */
static char bp[1024]; /* for tty set-up */
@ -551,7 +553,7 @@ initialize_client( void )
* A per-user config file has precedence over any system-wide
* config file, if one exists.
*/
#ifdef HAVE_GETPWUID_H
#ifdef HAVE_GETPWUID
if ((pw = getpwuid((uid_t) geteuid())) == (struct passwd *) NULL)
config = config_file;
else {
@ -678,6 +680,7 @@ initialize_client( void )
#ifndef NO_TERMCAP
{
char *term;
struct winsize win; /* for tty set-up */
if (((term = getenv("TERM")) == NULL) || (tgetent(bp, term) <= 0))

View file

@ -24,6 +24,10 @@
#include <ac/time.h>
#include <ac/unistd.h>
#ifdef HAVE_CONIO_H
#include <conio.h>
#endif
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>

View file

@ -56,6 +56,9 @@ typedef char * caddr_t;
/* we have winsock */
#define HAVE_WINSOCK 1
/* we have <conio.h> */
#define HAVE_CONIO_H 1
/* we have <io.h> */
#define HAVE_IO_H 1

View file

@ -473,7 +473,7 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber )
unsigned long tag = 0, netlen, toread;
unsigned char lc;
long rc;
int noctets;
long noctets;
unsigned int diff;
#ifdef LDAP_DEBUG