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/1513188ebd38
branches:  trunk
changeset: 366162:1513188ebd38
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 bec9c9cab2ab -r 1513188ebd38 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