Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/linux/common When dealing with an unknown value, ...



details:   https://anonhg.NetBSD.org/src/rev/5709b7751d5d
branches:  trunk
changeset: 459094:5709b7751d5d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Aug 23 11:19:39 2019 +0000

description:
When dealing with an unknown value, set -1, to prevent (harmless)
uninitialized accesses later.

diffstat:

 sys/compat/linux/common/linux_fcntl.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 70674b834813 -r 5709b7751d5d sys/compat/linux/common/linux_fcntl.h
--- a/sys/compat/linux/common/linux_fcntl.h     Fri Aug 23 11:09:14 2019 +0000
+++ b/sys/compat/linux/common/linux_fcntl.h     Fri Aug 23 11:19:39 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_fcntl.h,v 1.17 2015/03/01 13:19:39 njoly Exp $   */
+/*     $NetBSD: linux_fcntl.h,v 1.18 2019/08/23 11:19:39 maxv Exp $    */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -132,6 +132,9 @@
        case src_f##_WRLCK: \
                dst->l_type = dst_f##_WRLCK; \
                break; \
+       default: \
+               dst->l_type = -1; \
+               break; \
        } \
     }
 



Home | Main Index | Thread Index | Old Index