summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-03-13 12:53:46 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-03-13 12:53:46 +0000
commitc767c5a53dc0ab8ce9e92ab7599f7f3740819bfc (patch)
treed3d03d6f2f52aa3b546f7e2808d07921d09afe9e /usr/src/common
parent8585938b68c417dc081eba6fd4434484bb46dfe4 (diff)
parent36f5a109a7ea7c74a4d90af4f589df489e7537c0 (diff)
downloadillumos-joyent-c767c5a53dc0ab8ce9e92ab7599f7f3740819bfc.tar.gz
[illumos-gate merge]release-20190314
commit 0b427924a934b5ebe2ecd53ed66d8e65892da75e 10145 smbios_info_boot() gets NULL check wrong commit 464615a7e8b4d2de999abe2a1bd78b4be78efc0a 10497 loader: bootstrap.h cstyle cleanup commit cb0ea096588eb33ca26ea8853cda93b3372af2c7 10482 loader: console.c cstyle cleanup commit 6e4a33937f4aeff3a5b207e49607138445d66674 10498 loader: comconsole cstyle cleanup Conflicts: usr/src/uts/i86pc/os/cpuid.c
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/smbios/smb_info.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/common/smbios/smb_info.c b/usr/src/common/smbios/smb_info.c
index 71d5dd897d..2c67f2964a 100644
--- a/usr/src/common/smbios/smb_info.c
+++ b/usr/src/common/smbios/smb_info.c
@@ -1072,13 +1072,15 @@ id_t
smbios_info_boot(smbios_hdl_t *shp, smbios_boot_t *bp)
{
const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BOOT);
- const smb_boot_t *b = (smb_boot_t *)(uintptr_t)stp->smbst_hdr;
+ const smb_boot_t *b;
if (stp == NULL)
return (-1); /* errno is set for us */
bzero(bp, sizeof (smbios_boot_t));
+ b = (smb_boot_t *)(uintptr_t)stp->smbst_hdr;
+
bp->smbt_status = b->smbbo_status[0];
bp->smbt_size = stp->smbst_hdr->smbh_len - sizeof (smb_boot_t);
bp->smbt_data = bp->smbt_size ? &b->smbbo_status[1] : NULL;