From de41415836bb14cf4a42db4b24855c7542937ddb Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 21 Jul 2003 22:57:16 +0000 Subject: Fix printing of status when not in -l mode which was broken when the -l support was added. --- usr.bin/diff/diffdir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usr.bin/diff/diffdir.c') diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c index 63f555db984..f130cf00568 100644 --- a/usr.bin/diff/diffdir.c +++ b/usr.bin/diff/diffdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffdir.c,v 1.22 2003/07/09 00:07:44 millert Exp $ */ +/* $OpenBSD: diffdir.c,v 1.23 2003/07/21 22:57:17 millert Exp $ */ /* * Copyright (c) 2003 Todd C. Miller @@ -21,7 +21,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffdir.c,v 1.22 2003/07/09 00:07:44 millert Exp $"; +static const char rcsid[] = "$OpenBSD: diffdir.c,v 1.23 2003/07/21 22:57:17 millert Exp $"; #endif /* not lint */ #include @@ -138,8 +138,8 @@ diffdir(char *p1, char *p2) } } if (lflag) { - path1[dirlen1 - 1] = '\0'; - path2[dirlen2 - 1] = '\0'; + path1[dirlen1] = '\0'; + path2[dirlen2] = '\0'; for (dp1 = dirp1; (dent1 = *dp1) != NULL; dp1++) { print_status(dent1->d_status, path1, path2, dent1->d_name); @@ -291,6 +291,8 @@ diffit(struct dirent *dp, char *path1, size_t plen1, char *path2, size_t plen2) return; } dp->d_status = diffreg(path1, path2, flags); + if (!lflag) + print_status(dp->d_status, path1, path2, NULL); } /* -- cgit v1.2.3-59-g8ed1b