summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2018-01-04 11:38:42 +0000
committerkib <kib@FreeBSD.org>2018-01-04 11:38:42 +0000
commit5d2c0cabf49f238fc0ed8617d323ee3a994c2c42 (patch)
tree5e6c35db0b9397a6a3f4dc483d4bcdf680ff7faf
parent9c8e98d3aaaeaae6099e1b085344969154d5b75a (diff)
downloadFreeBSD-src-5d2c0cabf49f238fc0ed8617d323ee3a994c2c42.zip
FreeBSD-src-5d2c0cabf49f238fc0ed8617d323ee3a994c2c42.tar.gz
MFC r327284:
Style. Remove useless return.
-rw-r--r--usr.sbin/cpucontrol/intel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/cpucontrol/intel.c b/usr.sbin/cpucontrol/intel.c
index 61c7ddf..557cbac 100644
--- a/usr.sbin/cpucontrol/intel.c
+++ b/usr.sbin/cpucontrol/intel.c
@@ -86,7 +86,7 @@ intel_update(const char *dev, const char *path)
intel_fw_header_t *fw_header;
intel_cpu_signature_t *ext_table;
intel_ext_header_t *ext_header;
- uint32_t signature, flags;
+ uint32_t sig, signature, flags;
int32_t revision;
ssize_t ext_size;
size_t ext_table_size;
@@ -229,7 +229,8 @@ intel_update(const char *dev, const char *path)
for (i = 0; i < (ext_table_size / sizeof(uint32_t)); i++)
sum += *((uint32_t *)ext_header + i);
if (sum != 0) {
- WARNX(2, "%s: extended signature table checksum invalid",
+ WARNX(2,
+ "%s: extended signature table checksum invalid",
path);
goto no_table;
}
@@ -244,10 +245,10 @@ no_table:
*/
if (signature == fw_header->cpu_signature &&
(flags & fw_header->cpu_flags) != 0)
- goto matched;
+ goto matched;
else if (have_ext_table != 0) {
for (i = 0; i < ext_header->sig_count; i++) {
- uint32_t sig = ext_table[i].cpu_signature;
+ sig = ext_table[i].cpu_signature;
if (signature == sig &&
(flags & ext_table[i].cpu_flags) != 0)
goto matched;
@@ -262,14 +263,14 @@ matched:
goto fail;
}
fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ",
- path, dev, revision, fw_header->revision);
+ path, dev, revision, fw_header->revision);
args.data = fw_data;
args.size = data_size;
error = ioctl(devfd, CPUCTL_UPDATE, &args);
if (error < 0) {
- error = errno;
+ error = errno;
fprintf(stderr, "failed.\n");
- errno = error;
+ errno = error;
WARN(0, "ioctl()");
goto fail;
}
@@ -283,5 +284,4 @@ fail:
close(devfd);
if (fd >= 0)
close(fd);
- return;
}
OpenPOWER on IntegriCloud