Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/linux Try to avoid uninitialized gar...



details:   https://anonhg.NetBSD.org/src/rev/71eb45f1b7e6
branches:  trunk
changeset: 992861:71eb45f1b7e6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:38:32 2018 +0000

description:
Try to avoid uninitialized garbage that gcc helpfully ignores.

diffstat:

 sys/external/bsd/common/linux/linux_work.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 1514382aae7b -r 71eb45f1b7e6 sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 13:38:15 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 13:38:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_work.c,v 1.7 2018/08/27 13:35:55 riastradh Exp $ */
+/*     $NetBSD: linux_work.c,v 1.8 2018/08/27 13:38:32 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.7 2018/08/27 13:35:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.8 2018/08/27 13:38:32 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -193,7 +193,8 @@
 static void
 workqueue_whoami_work(struct work_struct *work)
 {
-       struct wq_whoami_work *www = www;
+       struct wq_whoami_work *www = container_of(work, struct wq_whoami_work,
+           www_work);
        struct workqueue_struct *wq = www->www_wq;
 
        KASSERT(wq->wq_lwp == NULL);



Home | Main Index | Thread Index | Old Index