Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/sys sys/compat: Don't clobber f_oflags with zero.



details:   https://anonhg.NetBSD.org/src/rev/320a6c8d3016
branches:  trunk
changeset: 1023228:320a6c8d3016
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 30 08:40:00 2021 +0000

description:
sys/compat: Don't clobber f_oflags with zero.

Mistake was introduced in previous refactoring.

diffstat:

 sys/compat/sys/mount.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 515edb7de9c2 -r 320a6c8d3016 sys/compat/sys/mount.h
--- a/sys/compat/sys/mount.h    Mon Aug 30 08:39:24 2021 +0000
+++ b/sys/compat/sys/mount.h    Mon Aug 30 08:40:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount.h,v 1.14 2020/07/03 18:49:37 jdolecek Exp $      */
+/*     $NetBSD: mount.h,v 1.15 2021/08/30 08:40:00 riastradh Exp $     */
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -101,10 +101,12 @@
 statvfs_to_statfs12(const struct statvfs *fs, struct statfs12 *s12)
 {
        size_t i = 0;
+
+       memset(s12, 0, sizeof(*s12));
+
        s12->f_type = 0;
        s12->f_oflags = (short)fs->f_flag;
 
-       memset(s12, 0, sizeof(*s12));
        for (i = 0; i < sizeof(__nv) / sizeof(__nv[0]); i++) {
                if (strcmp(__nv[i].name, fs->f_fstypename) == 0) {
                        s12->f_type = __nv[i].value;



Home | Main Index | Thread Index | Old Index