Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb KNF



details:   https://anonhg.NetBSD.org/src/rev/2349815028aa
branches:  trunk
changeset: 970342:2349815028aa
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 21 06:55:13 2020 +0000

description:
KNF

diffstat:

 sys/dev/usb/if_kue.c |   6 +++---
 sys/dev/usb/if_umb.c |  10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 47cff522006e -r 2349815028aa sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c      Sat Mar 21 06:54:56 2020 +0000
+++ b/sys/dev/usb/if_kue.c      Sat Mar 21 06:55:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kue.c,v 1.103 2020/03/15 23:04:50 thorpej Exp $     */
+/*     $NetBSD: if_kue.c,v 1.104 2020/03/21 06:55:22 skrll Exp $       */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.103 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.104 2020/03/21 06:55:22 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -503,7 +503,7 @@
                aprint_error_dev(self, "could not read Ethernet descriptor\n");
                return;
        }
-       memcpy(un->un_eaddr, sc->kue_desc.kue_macaddr, sizeof un->un_eaddr);
+       memcpy(un->un_eaddr, sc->kue_desc.kue_macaddr, sizeof(un->un_eaddr));
 
        sc->kue_mcfilters = kmem_alloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN,
            KM_SLEEP);
diff -r 47cff522006e -r 2349815028aa sys/dev/usb/if_umb.c
--- a/sys/dev/usb/if_umb.c      Sat Mar 21 06:54:56 2020 +0000
+++ b/sys/dev/usb/if_umb.c      Sat Mar 21 06:55:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_umb.c,v 1.17 2020/03/19 07:51:22 khorben Exp $ */
+/*     $NetBSD: if_umb.c,v 1.18 2020/03/21 06:55:13 skrll Exp $ */
 /*     $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.17 2020/03/19 07:51:22 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.18 2020/03/21 06:55:13 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2760,7 +2760,7 @@
 Static const char *
 inet_ntop4(const u_char *src, char *dst, size_t size)
 {
-       char tmp[sizeof "255.255.255.255"];
+       char tmp[sizeof("255.255.255.255")];
        int l;
 
        l = snprintf(tmp, sizeof(tmp), "%u.%u.%u.%u",
@@ -2789,7 +2789,7 @@
         * Keep this in mind if you think this function should have been coded
         * to use pointer overlays.  All the world's not a VAX.
         */
-       char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
+       char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
        char *tp, *ep;
        struct { int base, len; } best, cur;
 #define IN6ADDRSZ      16
@@ -2803,7 +2803,7 @@
         *      Copy the input (bytewise) array into a wordwise array.
         *      Find the longest run of 0x00's in src[] for :: shorthanding.
         */
-       memset(words, '\0', sizeof words);
+       memset(words, '\0', sizeof(words));
        for (i = 0; i < IN6ADDRSZ; i++)
                words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
        best.base = -1;



Home | Main Index | Thread Index | Old Index