Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Explicit format string for snprintf, spotted by tnn@



details:   https://anonhg.NetBSD.org/src/rev/a9444b99d683
branches:  trunk
changeset: 969687:a9444b99d683
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Feb 27 17:30:07 2020 +0000

description:
Explicit format string for snprintf, spotted by tnn@

diffstat:

 sys/dev/ic/bcmgenet.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r beecf4e57feb -r a9444b99d683 sys/dev/ic/bcmgenet.c
--- a/sys/dev/ic/bcmgenet.c     Thu Feb 27 17:17:34 2020 +0000
+++ b/sys/dev/ic/bcmgenet.c     Thu Feb 27 17:30:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgenet.c,v 1.2 2020/02/22 13:41:40 jmcneill Exp $ */
+/* $NetBSD: bcmgenet.c,v 1.3 2020/02/27 17:30:07 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.2 2020/02/22 13:41:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.3 2020/02/27 17:30:07 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -933,7 +933,7 @@
 
        /* Setup ethernet interface */
        ifp->if_softc = sc;
-       snprintf(ifp->if_xname, IFNAMSIZ, device_xname(sc->sc_dev));
+       snprintf(ifp->if_xname, IFNAMSIZ, "%s", device_xname(sc->sc_dev));
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 #ifdef GENET_MPSAFE
        ifp->if_extflags = IFEF_MPSAFE;



Home | Main Index | Thread Index | Old Index