PERFORCE change 125919 for review
Constantine A. Murenin
cnst at FreeBSD.org
Fri Aug 31 19:17:48 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125919
Change 125919 by cnst at 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);
}
More information about the p4-projects
mailing list