Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dev/dtrace sizeof(*var) instead of sizeo...



details:   https://anonhg.NetBSD.org/src/rev/0d5d6ba0a548
branches:  trunk
changeset: 961019:0d5d6ba0a548
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Apr 06 12:48:59 2021 +0000

description:
sizeof(*var) instead of sizeof(type)

diffstat:

 external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c |  6 +++---
 external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c   |  6 +++---
 external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c  |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r afc6d7bd0234 -r 0d5d6ba0a548 external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c        Tue Apr 06 12:48:36 2021 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c        Tue Apr 06 12:48:59 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_subr.c,v 1.14 2019/11/08 11:06:21 hannken Exp $ */
+/*     $NetBSD: dtrace_subr.c,v 1.15 2021/04/06 12:48:59 simonb Exp $  */
 
 /*
  * CDDL HEADER START
@@ -78,7 +78,7 @@
 {
        dtrace_invop_hdlr_t *hdlr;
 
-       hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP);
+       hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP);
        hdlr->dtih_func = func;
        hdlr->dtih_next = dtrace_invop_hdlr;
        dtrace_invop_hdlr = hdlr;
@@ -108,7 +108,7 @@
                prev->dtih_next = hdlr->dtih_next;
        }
 
-       kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t));
+       kmem_free(hdlr, sizeof(*hdlr));
 }
 
 /*ARGSUSED*/
diff -r afc6d7bd0234 -r 0d5d6ba0a548 external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c  Tue Apr 06 12:48:36 2021 +0000
+++ b/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c  Tue Apr 06 12:48:59 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_subr.c,v 1.4 2018/05/28 21:05:03 chs Exp $      */
+/*     $NetBSD: dtrace_subr.c,v 1.5 2021/04/06 12:48:59 simonb Exp $   */
 
 /*
  * CDDL HEADER START
@@ -94,7 +94,7 @@
 {
        dtrace_invop_hdlr_t *hdlr;
 
-       hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP);
+       hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP);
        hdlr->dtih_func = func;
        hdlr->dtih_next = dtrace_invop_hdlr;
        dtrace_invop_hdlr = hdlr;
@@ -124,7 +124,7 @@
                prev->dtih_next = hdlr->dtih_next;
        }
 
-       kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t));
+       kmem_free(hdlr, sizeof(*hdlr));
 }
 
 /*ARGSUSED*/
diff -r afc6d7bd0234 -r 0d5d6ba0a548 external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Tue Apr 06 12:48:36 2021 +0000
+++ b/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Tue Apr 06 12:48:59 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_subr.c,v 1.12 2019/02/13 08:46:40 rin Exp $     */
+/*     $NetBSD: dtrace_subr.c,v 1.13 2021/04/06 12:48:59 simonb Exp $  */
 
 /*
  * CDDL HEADER START
@@ -86,7 +86,7 @@
 {
        dtrace_invop_hdlr_t *hdlr;
 
-       hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP);
+       hdlr = kmem_alloc(sizeof(*hdlr), KM_SLEEP);
        hdlr->dtih_func = func;
        hdlr->dtih_next = dtrace_invop_hdlr;
        dtrace_invop_hdlr = hdlr;
@@ -116,7 +116,7 @@
                prev->dtih_next = hdlr->dtih_next;
        }
 
-       kmem_free(hdlr, sizeof (dtrace_invop_hdlr_t));
+       kmem_free(hdlr, sizeof(*hdlr));
 }
 
 void



Home | Main Index | Thread Index | Old Index