summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-13 23:05:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-13 23:05:49 +0000
commit507308c75500c3c52faff25e88191aa30d14e9c8 (patch)
tree9b2ab1a571eeaa1dfb473a1a49e52b51211e4042 /usr.sbin
parent6b27241fe20408c65e3d167d8d3e569857916468 (diff)
some KNF
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/makedbm/db.c8
-rw-r--r--usr.sbin/ypserv/makedbm/makedbm.c7
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/ypserv/makedbm/db.c b/usr.sbin/ypserv/makedbm/db.c
index 368a53d3a9a..b32ac5a15e1 100644
--- a/usr.sbin/ypserv/makedbm/db.c
+++ b/usr.sbin/ypserv/makedbm/db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db.c,v 1.2 2001/10/24 14:40:00 deraadt Exp $ */
+/* $OpenBSD: db.c,v 1.3 2002/02/13 23:05:48 deraadt Exp $ */
/*
* Copyright (c) 1997 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: db.c,v 1.2 2001/10/24 14:40:00 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: db.c,v 1.3 2002/02/13 23:05:48 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -63,8 +63,8 @@ char *database;
status = db->seq(db, &key, &val, R_FIRST);
while (status == 0) {
printf("%*.*s %*.*s\n",
- key.size-1, key.size-1, key.data,
- val.size-1, val.size-1, val.data);
+ (int)key.size-1, (int)key.size-1, (char *)key.data,
+ (int)val.size-1, (int)val.size-1, (char *)val.data);
status = db->seq(db, &key, &val, R_NEXT);
}
db->close(db);
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c
index 3c11cf4de85..545420ae2c3 100644
--- a/usr.sbin/ypserv/makedbm/makedbm.c
+++ b/usr.sbin/ypserv/makedbm/makedbm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makedbm.c,v 1.15 2001/10/24 14:40:00 deraadt Exp $ */
+/* $OpenBSD: makedbm.c,v 1.16 2002/02/13 23:05:48 deraadt Exp $ */
/*
* Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: makedbm.c,v 1.15 2001/10/24 14:40:00 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: makedbm.c,v 1.16 2002/02/13 23:05:48 deraadt Exp $";
#endif
#include <stdio.h>
@@ -182,7 +182,7 @@ create_database(infile, database, yp_input_file, yp_output_file,
char data_line[4096]; /* XXX: DB bsize = 4096 in ypdb.c */
char myname[MAXHOSTNAMELEN];
int line_no = 0;
- int len, fd;
+ int len;
char *p, *k, *v;
char *slash;
DBM *new_db;
@@ -190,7 +190,6 @@ create_database(infile, database, yp_input_file, yp_output_file,
char db_mapname[MAXPATHLEN], db_outfile[MAXPATHLEN],
db_tempname[MAXPATHLEN];
char empty_str[] = "";
- int count = 0;
if (strcmp(infile,"-") == 0) {
data_file = stdin;