The S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH mode can be
replaced by DEFFILEMODE.
See the diff below; no binary change.
cheers,
natano
Index: common/exf.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/exf.c,v
retrieving revision 1.32
diff -u -r1.32 exf.c
--- common/exf.c 14 Nov 2014 20:23:56 -0000 1.32
+++ common/exf.c 15 Nov 2014 18:52:41 -0000
@@ -255,9 +255,7 @@
/* Open a db structure. */
if ((ep->db = dbopen(rcv_name == NULL ? oname : NULL,
- O_NONBLOCK | O_RDONLY,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH,
- DB_RECNO, &oinfo)) == NULL) {
+ O_NONBLOCK | O_RDONLY, DEFFILEMODE, DB_RECNO, &oinfo)) == NULL) {
msgq_str(sp,
M_SYSERR, rcv_name == NULL ? oname : rcv_name, "%s");
/*
@@ -824,8 +822,7 @@
/* Open the file. */
SIGBLOCK;
- if ((fd = open(name, oflags,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) < 0) {
+ if ((fd = open(name, oflags, DEFFILEMODE)) < 0) {
msgq_str(sp, M_SYSERR, name, "%s");
SIGUNBLOCK;
return (1);