Fix int vs. size_t lossage.

This commit is contained in:
thorpej 1997-11-13 18:35:57 +00:00
parent 940f8fcfd1
commit ade3ce9789
5 changed files with 23 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: makedbm.c,v 1.9 1997/11/04 11:28:46 lukem Exp $ */
/* $NetBSD: makedbm.c,v 1.10 1997/11/13 18:35:57 thorpej Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: makedbm.c,v 1.9 1997/11/04 11:28:46 lukem Exp $");
__RCSID("$NetBSD: makedbm.c,v 1.10 1997/11/13 18:35:57 thorpej Exp $");
#endif
#include <sys/param.h>
@ -243,7 +243,7 @@ create_database(infile, database, yp_input_file, yp_output_file,
FILE *data_file;
char myname[MAXHOSTNAMELEN];
int line_no = 0;
int len;
size_t len;
char *p, *k, *v, *slash;
DBM *new_db;
static char mapname[] = "ypdbXXXXXX";

View File

@ -1,4 +1,4 @@
/* $NetBSD: mknetid.c,v 1.6 1997/11/01 14:25:00 lukem Exp $ */
/* $NetBSD: mknetid.c,v 1.7 1997/11/13 18:38:26 thorpej Exp $ */
/*
* Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mknetid.c,v 1.6 1997/11/01 14:25:00 lukem Exp $");
__RCSID("$NetBSD: mknetid.c,v 1.7 1997/11/13 18:38:26 thorpej Exp $");
#endif
/*
@ -228,7 +228,8 @@ read_passwd(fname)
const char *fname;
{
FILE *pfile;
int line_no, len, colon;
int line_no, colon;
size_t len;
char *p, *k, *u, *g;
if ((pfile = fopen(fname, "r")) == NULL)
@ -299,7 +300,8 @@ read_group(fname)
const char *fname;
{
FILE *gfile;
int line_no, len, colon;
int line_no, colon;
size_t len;
char *p, *k, *u, *g;
if ((gfile = fopen(fname, "r")) == NULL)
@ -390,7 +392,7 @@ print_hosts(fname, domain)
const char *fname, *domain;
{
FILE *hfile;
int len;
size_t len;
char *p, *k, *u;
if ((hfile = fopen(fname, "r")) == NULL)
@ -421,7 +423,7 @@ print_netid(fname)
const char *fname;
{
FILE *mfile;
int len;
size_t len;
char *p, *k, *u;
mfile = fopen(fname, "r");

View File

@ -1,4 +1,4 @@
/* $NetBSD: revnetgroup.c,v 1.3 1997/11/01 14:25:04 lukem Exp $ */
/* $NetBSD: revnetgroup.c,v 1.4 1997/11/13 18:40:12 thorpej Exp $ */
/*
* Copyright (c) 1995
@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: revnetgroup.c,v 1.3 1997/11/01 14:25:04 lukem Exp $");
__RCSID("$NetBSD: revnetgroup.c,v 1.4 1997/11/13 18:40:12 thorpej Exp $");
#endif
#include <ctype.h>
@ -89,7 +89,8 @@ main(argc, argv)
struct member_entry *mcur;
FILE *fp;
char *p, *host, *user, *domain;
int ch, len, i;
int ch, i;
size_t len;
char *key;
int hosts = -1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdethers.c,v 1.8 1997/11/02 14:25:25 lukem Exp $ */
/* $NetBSD: stdethers.c,v 1.9 1997/11/13 18:41:51 thorpej Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: stdethers.c,v 1.8 1997/11/02 14:25:25 lukem Exp $");
__RCSID("$NetBSD: stdethers.c,v 1.9 1997/11/13 18:41:51 thorpej Exp $");
#endif
#include <sys/types.h>
@ -63,7 +63,8 @@ main(argc, argv)
{
struct ether_addr eth_addr;
FILE *data_file;
int line_no, len;
int line_no;
size_t len;
char *fname, *p, *h;
char hostname[MAXHOSTNAMELEN + 1];

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdhosts.c,v 1.6 1997/11/01 14:25:09 lukem Exp $ */
/* $NetBSD: stdhosts.c,v 1.7 1997/11/13 18:42:48 thorpej Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: stdhosts.c,v 1.6 1997/11/01 14:25:09 lukem Exp $");
__RCSID("$NetBSD: stdhosts.c,v 1.7 1997/11/13 18:42:48 thorpej Exp $");
#endif
#include <sys/types.h>
@ -60,7 +60,8 @@ main(argc, argv)
{
struct in_addr host_addr;
FILE *data_file;
int line_no, len;
int line_no;
size_t len;
char *k, *v, *addr_string, *fname;
addr_string = NULL; /* XXX gcc -Wuninitialized */