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/31a1e8cf86b1
branches:  trunk
changeset: 453710:31a1e8cf86b1
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 544d88fcf267 -r 31a1e8cf86b1 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