Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2007 02:17:47 GMT
From:      "Constantine A. Murenin" <cnst@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 125919 for review
Message-ID:  <200709010217.l812HliK038861@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125919

Change 125919 by cnst@dale on 2007/09/01 02:17:08

	KNF for set_T_dev_t()

Affected files ...

.. //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.c#8 edit

Differences ...

==== //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.c#8 (text+ko) ====

@@ -561,17 +561,13 @@
 	static struct stat statb;
 
 	if (strcmp(path, "none") && strcmp(path, "off")) {
-		int rc = stat(path, &statb);
-		if (rc) {
+		if (stat(path, &statb) != 0)
 			err(1, "cannot stat %s", path);
-		}
 
-		if (!S_ISCHR(statb.st_mode)) {
+		if (!S_ISCHR(statb.st_mode))
 			errx(1, "must specify a device special file.");
-		}
-	} else {
+	} else
 		statb.st_rdev = NODEV;
-	}
 	*val = (void *) &statb.st_rdev;
 	*size = sizeof(statb.st_rdev);
 }



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