Date: Sun, 14 Feb 2016 13:42:16 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295609 - head/sys/dev/xen/blkfront Message-ID: <201602141342.u1EDgGqG052752@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Sun Feb 14 13:42:16 2016 New Revision: 295609 URL: https://svnweb.freebsd.org/changeset/base/295609 Log: Don't dereference a pointer immediately after determining that it is equal to NULL. [1] While I'm here, s/xb/xbd/ (the name changed a long time ago but this instance wasn't corrected). Reported by: PVS-Studio [1] Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Sun Feb 14 07:20:07 2016 (r295608) +++ head/sys/dev/xen/blkfront/blkfront.c Sun Feb 14 13:42:16 2016 (r295609) @@ -674,7 +674,7 @@ xbd_open(struct disk *dp) struct xbd_softc *sc = dp->d_drv1; if (sc == NULL) { - printf("xb%d: not found", sc->xbd_unit); + printf("xbd%d: not found", dp->d_unit); return (ENXIO); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602141342.u1EDgGqG052752>