summaryrefslogtreecommitdiffstats
path: root/usr.bin/find/find.c
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1995-02-27 20:52:36 +0000
committerguido <guido@FreeBSD.org>1995-02-27 20:52:36 +0000
commit5ed0eb541255a49d2fe844eced72201e2c053205 (patch)
treecfec41297d690c5a70037e1a57183d9f4cee1b49 /usr.bin/find/find.c
parent6becd688afcb2158ca5aef1388b844ca4191ecb7 (diff)
downloadFreeBSD-src-5ed0eb541255a49d2fe844eced72201e2c053205.zip
FreeBSD-src-5ed0eb541255a49d2fe844eced72201e2c053205.tar.gz
Fix completely broken find behaviour:
a find -foo -o -bar would behave like find -bar. The same for -a This broke (among others) ./etc/security. Obtained from: NetBSD
Diffstat (limited to 'usr.bin/find/find.c')
-rw-r--r--usr.bin/find/find.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c
index 22fc3a3..b1b48ba 100644
--- a/usr.bin/find/find.c
+++ b/usr.bin/find/find.c
@@ -99,6 +99,13 @@ find_formplan(argv)
if (plan == NULL)
tail = plan = new;
else {
+ new = c_openparen();
+ new->next = plan;
+ plan = new;
+ new = c_closeparen();
+ tail->next = new;
+ tail = new;
+ new = c_print();
tail->next = new;
tail = new;
}
OpenPOWER on IntegriCloud