summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-25 03:44:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-25 03:44:50 +0000
commit804ff7780ca8fc6d181c639ba34d785d9dc95a33 (patch)
treeab29557c4039057019980c5608c9a9024399f84a
parent6e12585b08006aa3e35d8a7708dc18054c4015d4 (diff)
knf
-rw-r--r--usr.bin/diff/diffdir.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c
index 1ae9b4faf0c..252f9f5984a 100644
--- a/usr.bin/diff/diffdir.c
+++ b/usr.bin/diff/diffdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffdir.c,v 1.8 2003/06/25 03:39:23 tedu Exp $ */
+/* $OpenBSD: diffdir.c,v 1.9 2003/06/25 03:44:49 deraadt Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -84,14 +84,12 @@ static void only(struct dir *dp, int which);
static void scanpr(struct dir *, int, char *, char *, char *, char *, char *);
static int entcmp(const void *, const void *);
-
void
diffdir(char **argv)
{
- struct dir *d1, *d2;
struct dir *dir1, *dir2;
- int i;
- int cmp;
+ struct dir *d1, *d2;
+ int i, cmp;
if (opt == D_IFDEF) {
fprintf(stderr, "diff: can't specify -I with directories\n");
@@ -268,10 +266,9 @@ entcmp(const void *v1, const void *v2)
static void
compare(struct dir *dp)
{
- int i, j;
- int f1, f2, fmt1, fmt2;
- struct stat stb1, stb2;
char buf1[BUFSIZ], buf2[BUFSIZ];
+ int i, j, f1, f2, fmt1, fmt2;
+ struct stat stb1, stb2;
strcpy(efile1, dp->d_entry);
strcpy(efile2, dp->d_entry);
@@ -361,7 +358,8 @@ closem:
static void
calldiff(char *wantpr)
{
- int pid, lstatus, lstatus2, pv[2];
+ int lstatus, lstatus2, pv[2];
+ pid_t pid;
prargs[2] = wantpr;
fflush(stdout);
@@ -420,9 +418,8 @@ calldiff(char *wantpr)
int
ascii(int f)
{
- char buf[BUFSIZ];
+ char buf[BUFSIZ], *cp;
int cnt;
- char *cp;
lseek(f, (off_t)0, SEEK_SET);
cnt = read(f, buf, BUFSIZ);