diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-02-20 03:43:12 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-02-20 03:43:12 +0000 |
| commit | 4d24901ac9131267fd188c5e1ee19a219847238a (patch) | |
| tree | c6b56412f6ca4e7ffd1dc366d2fc51f7fa34600f /sys/dev/isp/isp_pci.c | |
| parent | 85161825cf4af1294d9464badbe675a1419bd4fd (diff) | |
Notes
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
| -rw-r--r-- | sys/dev/isp/isp_pci.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index b0acd9605b755..8a51cf511a757 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -583,10 +583,10 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) name, &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_FULL_DUPLEX; } - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%stopology", prefix); if (resource_string_value(device_get_name(dev), device_get_unit(dev), - name, (const char **) &sptr) == 0 && sptr != 0) { + name, (const char **) &sptr) == 0 && sptr != NULL) { if (strcmp(sptr, "lport") == 0) { isp->isp_confopts |= ISP_CFG_LPORT; } else if (strcmp(sptr, "nport") == 0) { @@ -631,12 +631,12 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) * hint replacement to specify WWN strings with a leading * 'w' (e..g w50000000aaaa0001). Sigh. */ - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%sportwwn", prefix); tval = resource_string_value(device_get_name(dev), device_get_unit(dev), name, (const char **) &sptr); - if (tval == 0 && sptr != 0 && *sptr++ == 'w') { - char *eptr = 0; + if (tval == 0 && sptr != NULL && *sptr++ == 'w') { + char *eptr = NULL; ISP_FC_PC(isp, chan)->def_wwpn = strtouq(sptr, &eptr, 16); if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwpn == -1) { device_printf(dev, "mangled portwwn hint '%s'\n", sptr); @@ -644,12 +644,12 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) } } - sptr = 0; + sptr = NULL; snprintf(name, sizeof(name), "%snodewwn", prefix); tval = resource_string_value(device_get_name(dev), device_get_unit(dev), name, (const char **) &sptr); - if (tval == 0 && sptr != 0 && *sptr++ == 'w') { - char *eptr = 0; + if (tval == 0 && sptr != NULL && *sptr++ == 'w') { + char *eptr = NULL; ISP_FC_PC(isp, chan)->def_wwnn = strtouq(sptr, &eptr, 16); if (eptr < sptr + 16 || ISP_FC_PC(isp, chan)->def_wwnn == 0) { device_printf(dev, "mangled nodewwn hint '%s'\n", sptr); |
