svn commit: r336615 - head/sys/dev/ocs_fc
Mark Johnston
markj at FreeBSD.org
Sun Jul 22 18:31:16 UTC 2018
Author: markj
Date: Sun Jul 22 18:31:15 2018
New Revision: 336615
URL: https://svnweb.freebsd.org/changeset/base/336615
Log:
Use the right buffer size when calling snprintf().
PR: 229952
Modified:
head/sys/dev/ocs_fc/ocs_ioctl.c
Modified: head/sys/dev/ocs_fc/ocs_ioctl.c
==============================================================================
--- head/sys/dev/ocs_fc/ocs_ioctl.c Sun Jul 22 18:07:08 2018 (r336614)
+++ head/sys/dev/ocs_fc/ocs_ioctl.c Sun Jul 22 18:31:15 2018 (r336615)
@@ -1080,7 +1080,7 @@ ocs_sysctl_init(ocs_t *ocs)
struct sysctl_oid *tree = device_get_sysctl_tree(ocs->dev);
struct sysctl_oid *vtree;
const char *str = NULL;
- char sli_intf[16], name[16];
+ char name[16];
uint32_t rev, if_type, family, i;
ocs_fcport *fcp = NULL;
@@ -1120,7 +1120,7 @@ ocs_sysctl_init(ocs_t *ocs)
0, "Firmware Revision");
memset(ocs->sli_intf, 0, sizeof(ocs->sli_intf));
- snprintf(ocs->sli_intf, sizeof(sli_intf), "%08x",
+ snprintf(ocs->sli_intf, sizeof(ocs->sli_intf), "%08x",
ocs_config_read32(ocs, SLI4_INTF_REG));
SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"sli_intf", CTLFLAG_RD,
More information about the svn-src-all
mailing list