Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2019 18:11:17 +0000 (UTC)
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348366 - head/sys/dev/ips
Message-ID:  <201905291811.x4TIBHsa054136@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lwhsu
Date: Wed May 29 18:11:17 2019
New Revision: 348366
URL: https://svnweb.freebsd.org/changeset/base/348366

Log:
  Add the likely missing braces in ips(4).  This is found by gcc warning that
  the code is not guarded by the if clause and has misleading indentation.
  
  Approved by:	scottl
  MFC after:	3 days
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D20427

Modified:
  head/sys/dev/ips/ips.c

Modified: head/sys/dev/ips/ips.c
==============================================================================
--- head/sys/dev/ips/ips.c	Wed May 29 16:39:52 2019	(r348365)
+++ head/sys/dev/ips/ips.c	Wed May 29 18:11:17 2019	(r348366)
@@ -287,10 +287,11 @@ static int ips_diskdev_free(ips_softc_t *sc)
 	int i;
 	int error = 0;
 	for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){
-		if(sc->diskdev[i])
+		if(sc->diskdev[i]) {
 			error = device_delete_child(sc->dev, sc->diskdev[i]);
 			if(error)
 				return error;
+		}
 	}
 	bus_generic_detach(sc->dev);
 	return 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905291811.x4TIBHsa054136>