Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Replace memset's of ksiginfo_t with KSI_INIT (which...



details:   https://anonhg.NetBSD.org/src/rev/ca45cc274f15
branches:  trunk
changeset: 565289:ca45cc274f15
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Apr 03 19:38:04 2004 +0000

description:
Replace memset's of ksiginfo_t with KSI_INIT (which is the proper way to
initialize ksiginfo_t structures).

diffstat:

 sys/kern/kern_sig.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r bb420a2ad8bd -r ca45cc274f15 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Sat Apr 03 18:18:21 2004 +0000
+++ b/sys/kern/kern_sig.c       Sat Apr 03 19:38:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.190 2004/04/01 16:56:44 matt Exp $      */
+/*     $NetBSD: kern_sig.c,v 1.191 2004/04/03 19:38:04 matt Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.190 2004/04/01 16:56:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.191 2004/04/03 19:38:04 matt Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_compat_sunos.h"
@@ -742,7 +742,7 @@
        pc = cp->p_cred;
        if ((u_int)SCARG(uap, signum) >= NSIG)
                return (EINVAL);
-       memset(&ksi, 0, sizeof(ksi));
+       KSI_INIT(&ksi);
        ksi.ksi_signo = SCARG(uap, signum);
        ksi.ksi_code = SI_USER;
        ksi.ksi_pid = cp->p_pid;
@@ -827,7 +827,7 @@
 gsignal(int pgid, int signum)
 {
        ksiginfo_t ksi;
-       memset(&ksi, 0, sizeof(ksi));
+       KSI_INIT(&ksi);
        ksi.ksi_signo = signum;
        kgsignal(pgid, &ksi, NULL);
 }
@@ -849,7 +849,7 @@
 pgsignal(struct pgrp *pgrp, int sig, int checkctty)
 {
        ksiginfo_t ksi;
-       memset(&ksi, 0, sizeof(ksi));
+       KSI_INIT(&ksi);
        ksi.ksi_signo = sig;
        kpgsignal(pgrp, &ksi, NULL, checkctty);
 }
@@ -918,7 +918,7 @@
 {
        ksiginfo_t ksi;
 
-       (void)memset(&ksi, 0, sizeof(ksi));
+       KSI_INIT(&ksi);
        ksi.ksi_signo = SIGCHLD;
        ksi.ksi_code = p->p_xstat == SIGCONT ? CLD_CONTINUED : CLD_STOPPED;
        ksi.ksi_pid = p->p_pid;
@@ -949,7 +949,7 @@
 {
        ksiginfo_t ksi;
 
-       memset(&ksi, 0, sizeof(ksi));
+       KSI_INIT(&ksi);
        ksi.ksi_signo = signum;
        kpsignal2(p, &ksi, dolock);
 }
@@ -1861,7 +1861,7 @@
                         * because the signal was not caught, or because the
                         * user did not request SA_SIGINFO
                         */
-                       (void)memset(&ksi1, 0, sizeof(ksi1));
+                       KSI_INIT(&ksi1);
                        ksi1.ksi_signo = signum;
                        kpsendsig(l, &ksi1, returnmask);
                } else {



Home | Main Index | Thread Index | Old Index