summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/less/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/less/edit.c b/usr.bin/less/edit.c
index e257fba39bf..7df69297c74 100644
--- a/usr.bin/less/edit.c
+++ b/usr.bin/less/edit.c
@@ -679,7 +679,7 @@ loop:
/*
* Overwrite: create the file.
*/
- logfile = creat(filename, 0644);
+ logfile = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0644);
break;
case 'A': case 'a':
/*