NACK: [PATCH] clean up missing whitespaces
Colin Ian King
colin.king at canonical.com
Tue Jan 24 11:28:47 UTC 2017
Ignore, bad patch, will resend.
On 24/01/17 11:28, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Minor code style fixes, insert missing whitespaces, make code
> consistent across fwts
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> doc/fwts.1 | 5 ++
> fwts-test/arg-help-0001/arg-help-0001.log | 4 ++
> fwts-test/arg-help-0001/arg-help-0002.log | 4 ++
> src/acpi/ac_adapter/ac_adapter.c | 4 +-
> src/acpi/apicinstance/apicinstance.c | 2 +-
> src/acpi/battery/battery.c | 6 +-
> src/acpi/brightness/autobrightness.c | 3 +-
> src/acpi/checksum/checksum.c | 2 +-
> src/acpi/cstates/cstates.c | 12 ++--
> src/acpi/dmar/dmar.c | 2 +-
> src/acpi/lid/lid.c | 5 +-
> src/acpi/method/method.c | 2 +-
> src/acpi/powerbutton/powerbutton.c | 2 +-
> src/acpi/s3/s3.c | 91 +++++++++++++++++++++++++++++--
> src/acpi/s4/s4.c | 2 +-
> src/acpica/fwts_acpica.c | 4 +-
> src/bios/bios32/bios32.c | 2 +-
> src/bios/bios_info/bios_info.c | 2 +-
> src/bios/ebdadump/ebdadump.c | 2 +-
> src/bios/mtrr/mtrr.c | 16 +++---
> src/bios/multiproc/mpcheck.c | 2 +-
> src/bios/pciirq/pciirq.c | 4 +-
> src/bios/pnp/pnp.c | 2 +-
> src/bios/romdump/romdump.c | 4 +-
> src/dmi/dmicheck/dmicheck.c | 2 +-
> src/lib/src/fwts_acpi_object_eval.c | 2 +-
> src/lib/src/fwts_acpi_tables.c | 14 ++---
> src/lib/src/fwts_args.c | 8 +--
> src/lib/src/fwts_checksum.c | 2 +-
> src/lib/src/fwts_cpu.c | 4 +-
> src/lib/src/fwts_dump.c | 4 +-
> src/lib/src/fwts_gpe.c | 6 +-
> src/lib/src/fwts_klog.c | 4 +-
> src/lib/src/fwts_log.c | 8 +--
> src/lib/src/fwts_multiproc.c | 4 +-
> src/lib/src/fwts_smbios.c | 4 +-
> src/lib/src/fwts_summary.c | 4 +-
> src/lib/src/fwts_text_list.c | 2 +-
> src/lib/src/fwts_uefi.c | 2 +-
> src/uefi/csm/csm.c | 2 +-
> 40 files changed, 177 insertions(+), 79 deletions(-)
>
> diff --git a/doc/fwts.1 b/doc/fwts.1
> index ebd2c6b..e05c111 100644
> --- a/doc/fwts.1
> +++ b/doc/fwts.1
> @@ -252,6 +252,11 @@ maximum time between S3 iterations.
> specified the number of multiple S3 suspend/resume tests to run. The default
> is 2 tests.
> .TP
> +.B \-\-s3\-resume\-hook=hookscript
> +specifies a script or program to run after each S3 resume. The hookscript must
> +return 0 to indicate success, or non-zero to indicate failure. Failures will
> +abort subsequent S3 test iterations.
> +.TP
> .B \-\-s3\-quirks=--quirk[,--quirk]
> specify a comma separated list of quirk arguments to pass to pm-suspend, for example: \-\-s3\-quirks=\-\-quirk\-s3\-bios,\-\-quirk\-save\-pci
> .TP
> diff --git a/fwts-test/arg-help-0001/arg-help-0001.log b/fwts-test/arg-help-0001/arg-help-0001.log
> index 78dd6e3..15f8c24 100644
> --- a/fwts-test/arg-help-0001/arg-help-0001.log
> +++ b/fwts-test/arg-help-0001/arg-help-0001.log
> @@ -162,6 +162,10 @@
> --s3-quirks Comma separated list
> of quirk arguments to
> pass to pm-suspend.
> +--s3-resume-hook hook Run a hook script
> + after each S3 resume,
> + 0 exit indicates
> + success.
> --s3-resume-time Maximum expected
> resume time in
> seconds, e.g.
> diff --git a/fwts-test/arg-help-0001/arg-help-0002.log b/fwts-test/arg-help-0001/arg-help-0002.log
> index 78dd6e3..15f8c24 100644
> --- a/fwts-test/arg-help-0001/arg-help-0002.log
> +++ b/fwts-test/arg-help-0001/arg-help-0002.log
> @@ -162,6 +162,10 @@
> --s3-quirks Comma separated list
> of quirk arguments to
> pass to pm-suspend.
> +--s3-resume-hook hook Run a hook script
> + after each S3 resume,
> + 0 exit indicates
> + success.
> --s3-resume-time Maximum expected
> resume time in
> seconds, e.g.
> diff --git a/src/acpi/ac_adapter/ac_adapter.c b/src/acpi/ac_adapter/ac_adapter.c
> index 7b4bc85..b568495 100644
> --- a/src/acpi/ac_adapter/ac_adapter.c
> +++ b/src/acpi/ac_adapter/ac_adapter.c
> @@ -95,7 +95,7 @@ static int ac_adapter_test3(fwts_framework *fw)
>
> fwts_printf(fw, "==== Please unplug the laptop power. ====\n");
>
> - for (i=0;i<20;i++) {
> + for (i = 0; i < 20; i++) {
> if ((buffer = fwts_acpi_event_read(fd, &len, 1)) != NULL) {
> if (strstr(buffer, "ac_adapter")) {
> events++;
> @@ -122,7 +122,7 @@ static int ac_adapter_test3(fwts_framework *fw)
>
> fwts_printf(fw, "==== Please re-connect the laptop power. ====\n");
>
> - for (i=0;i<20;i++) {
> + for (i = 0; i < 20; i++) {
> if ((buffer = fwts_acpi_event_read(fd, &len, 1)) != NULL) {
> events++;
> if (strstr(buffer, "ac_adapter")) {
> diff --git a/src/acpi/apicinstance/apicinstance.c b/src/acpi/apicinstance/apicinstance.c
> index cad408b..bd909bf 100644
> --- a/src/acpi/apicinstance/apicinstance.c
> +++ b/src/acpi/apicinstance/apicinstance.c
> @@ -27,7 +27,7 @@ static int apicinstance_test1(fwts_framework *fw)
> int i;
> int count;
>
> - for (i=0, count=0;; i++) {
> + for (i = 0, count = 0;; i++) {
> fwts_acpi_table_info *table;
>
> if (fwts_acpi_get_table(fw, i, &table) != FWTS_OK) {
> diff --git a/src/acpi/battery/battery.c b/src/acpi/battery/battery.c
> index 8c3c211..8e6509b 100644
> --- a/src/acpi/battery/battery.c
> +++ b/src/acpi/battery/battery.c
> @@ -37,7 +37,7 @@ static void battery_discharge(fwts_framework *fw, const int secs)
> int i;
> fwts_cpu_consume_start();
>
> - for (i=0;i<secs;i++) {
> + for (i = 0; i < secs; i++) {
> fwts_printf(fw, "Waiting %2.2d/%d\r", secs-i, secs);
> sleep(1);
> }
> @@ -136,7 +136,7 @@ static void check_charging(fwts_framework *fw, int index, char *name)
> fwts_printf(fw, "==== Waiting to see if battery '%s' charges ====\n", name);
>
> initial_value = get_full(fw, index);
> - for (i=0; i <= 120; i++) {
> + for (i = 0; i <= 120; i++) {
> uint32_t new_value = get_full(fw, index);
>
> if (new_value>initial_value) {
> @@ -282,7 +282,7 @@ static int battery_test1(fwts_framework *fw)
>
> fwts_log_info(fw, "Found %d batteries.", count);
>
> - for (i=0; i<count; i++)
> + for (i = 0; i < count; i++)
> do_battery_test(fw, i);
>
> return FWTS_OK;
> diff --git a/src/acpi/brightness/autobrightness.c b/src/acpi/brightness/autobrightness.c
> index c6d34c9..e9c6899 100644
> --- a/src/acpi/brightness/autobrightness.c
> +++ b/src/acpi/brightness/autobrightness.c
> @@ -75,7 +75,8 @@ static int auto_brightness_test1(fwts_framework *fw)
> }
> fwts_passed(fw, "Maximum brightness for %s is %d which is sane.", entry->d_name, max_brightness);
>
> - if ((actual_brightness >=0) && (actual_brightness <= max_brightness))
> + if ((actual_brightness >= 0) &&
> + (actual_brightness <= max_brightness))
> fwts_passed(fw, "Actual brightness for %s is %d which is in range 0..%d.",
> entry->d_name, actual_brightness, max_brightness);
> else
> diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
> index e232649..9ab7043 100644
> --- a/src/acpi/checksum/checksum.c
> +++ b/src/acpi/checksum/checksum.c
> @@ -97,7 +97,7 @@ static int checksum_scan_tables(fwts_framework *fw)
> {
> int i;
>
> - for (i=0;; i++) {
> + for (i = 0;; i++) {
> fwts_acpi_table_info *table;
> fwts_acpi_table_header *hdr;
> uint8_t checksum;
> diff --git a/src/acpi/cstates/cstates.c b/src/acpi/cstates/cstates.c
> index 24a87d7..ec1ad8b 100644
> --- a/src/acpi/cstates/cstates.c
> +++ b/src/acpi/cstates/cstates.c
> @@ -56,7 +56,7 @@ static void get_cstates(char *path, fwts_cstates *state)
> DIR *dir;
> int i;
>
> - for (i=MIN_CSTATE; i<MAX_CSTATE; i++) {
> + for (i = MIN_CSTATE; i < MAX_CSTATE; i++) {
> state->counts[i] = 0;
> state->present[i] = false;
> state->used[i] = false;
> @@ -122,7 +122,7 @@ static void do_cpu(fwts_framework *fw, int nth, int cpus, int cpu, char *path)
>
> get_cstates(path, &initial);
>
> - for (i=0; (i < TOTAL_WAIT_TIME) && keepgoing; i++) {
> + for (i = 0; (i < TOTAL_WAIT_TIME) && keepgoing; i++) {
> int j;
>
> snprintf(buffer, sizeof(buffer),"(CPU %d of %d)", nth+1, cpus);
> @@ -146,7 +146,7 @@ static void do_cpu(fwts_framework *fw, int nth, int cpus, int cpu, char *path)
> get_cstates(path, ¤t);
>
> keepgoing = false;
> - for (j=MIN_CSTATE; j<MAX_CSTATE;j++) {
> + for (j = MIN_CSTATE; j < MAX_CSTATE;j++) {
> if (initial.counts[j] != current.counts[j]) {
> initial.counts[j] = current.counts[j];
> initial.used[j] = true;
> @@ -159,7 +159,7 @@ static void do_cpu(fwts_framework *fw, int nth, int cpus, int cpu, char *path)
> *buffer = '\0';
> if (keepgoing) {
> /* Not a failure, but not a pass either! */
> - for (i=MIN_CSTATE; i<MAX_CSTATE;i++) {
> + for (i = MIN_CSTATE; i < MAX_CSTATE;i++) {
> if (initial.present[i] && !initial.used[i]) {
> snprintf(tmp, sizeof(tmp), "C%i ", i);
> strcat(buffer, tmp);
> @@ -169,7 +169,7 @@ static void do_cpu(fwts_framework *fw, int nth, int cpus, int cpu, char *path)
> "This is not a failure, however it is not a "
> "complete and thorough test.", cpu, buffer);
> } else {
> - for (i=MIN_CSTATE; i<MAX_CSTATE;i++) {
> + for (i = MIN_CSTATE; i < MAX_CSTATE;i++) {
> if (initial.present[i] && initial.used[i]) {
> snprintf(tmp, sizeof(tmp), "C%i ", i);
> strcat(buffer, tmp);
> @@ -180,7 +180,7 @@ static void do_cpu(fwts_framework *fw, int nth, int cpus, int cpu, char *path)
> }
>
> count = 0;
> - for (i=MIN_CSTATE; i<MAX_CSTATE; i++)
> + for (i = MIN_CSTATE; i < MAX_CSTATE; i++)
> if (initial.present[i])
> count++;
>
> diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
> index f547193..c287643 100644
> --- a/src/acpi/dmar/dmar.c
> +++ b/src/acpi/dmar/dmar.c
> @@ -71,7 +71,7 @@ struct acpi_table_rmrr {
> } __attribute__ ((packed));
>
> enum acpi_dev_scope_type {
> - ACPI_DEV_ENDPOINT=0x01,
> + ACPI_DEV_ENDPOINT = 0x01,
> ACPI_DEV_P2PBRIDGE,
> ACPI_DEV_IOAPIC,
> ACPI_DEV_HPET,
> diff --git a/src/acpi/lid/lid.c b/src/acpi/lid/lid.c
> index d294ffb..93e031c 100644
> --- a/src/acpi/lid/lid.c
> +++ b/src/acpi/lid/lid.c
> @@ -49,8 +49,9 @@ static void lid_check_field_poll(fwts_framework *fw,
> int tmp_matching = 0;
> int tmp_not_matching = 0;
>
> - for (i=0; i<100; i++) {
> - fwts_button_match_state(fw, button, &tmp_matching, &tmp_not_matching);
> + for (i = 0; i < 100; i++) {
> + fwts_button_match_state(fw, button,
> + &tmp_matching, &tmp_not_matching);
> usleep(10);
>
> if (tmp_matching != 0)
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index e282d60..0a56159 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -5331,7 +5331,7 @@ static int method_test_BTM(fwts_framework *fw)
> static int values[] = { 0, 1, 100, 200, 0x7fffffff };
> int i;
>
> - for (i=0 ; i < 5; i++) {
> + for (i = 0 ; i < 5; i++) {
> ACPI_OBJECT arg[1];
> arg[0].Type = ACPI_TYPE_INTEGER;
> arg[0].Integer.Value = values[i];
> diff --git a/src/acpi/powerbutton/powerbutton.c b/src/acpi/powerbutton/powerbutton.c
> index 9e737f3..6b15336 100644
> --- a/src/acpi/powerbutton/powerbutton.c
> +++ b/src/acpi/powerbutton/powerbutton.c
> @@ -46,7 +46,7 @@ static int power_button_test1(fwts_framework *fw)
>
> matching = 0;
>
> - for (i=0;i<=20;i++) {
> + for (i = 0;i <= 20; i++) {
> if ((buffer = fwts_acpi_event_read(fd, &len, 1)) != NULL) {
> if (strstr(buffer, "button/power")) {
> matching++;
> diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
> index 9b3e7aa..986e43a 100644
> --- a/src/acpi/s3/s3.c
> +++ b/src/acpi/s3/s3.c
> @@ -28,6 +28,7 @@
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <unistd.h>
> +#include <errno.h>
>
> #define PM_SUSPEND_PMUTILS "pm-suspend"
> #define PM_SUSPEND_HYBRID_PMUTILS "pm-suspend-hybrid"
> @@ -44,6 +45,7 @@ static bool s3_min_max_delay = false;
> static float s3_suspend_time = 15.0; /* Maximum allowed suspend time */
> static float s3_resume_time = 15.0; /* Maximum allowed resume time */
> static bool s3_hybrid = false;
> +static char *s3_hook = NULL; /* Hook to run after each S3 */
>
> static int s3_init(fwts_framework *fw)
> {
> @@ -58,6 +60,50 @@ static int s3_init(fwts_framework *fw)
> return FWTS_OK;
> }
>
> +/*
> + * s3_hook_exec()
> + * run a given hook script
> + */
> +static int s3_hook_exec(fwts_framework *fw, char *hook)
> +{
> + pid_t pid;
> + int status, ret;
> +
> + pid = fork();
> + if (pid < 0) {
> + fwts_log_error(fw, "Failed to fork (to run hook script), "
> + "errno=%d (%s)\n", errno, strerror(errno));
> + return FWTS_ERROR;
> + } else if (pid == 0) {
> + /* Child */
> +
> + (void)execl(hook, "", NULL);
> +
> + /* We only get here if execl failed */
> + fwts_log_error(fw, "Failed to execl '%s', "
> + "errno=%d (%s)\n", hook, errno, strerror(errno));
> + return FWTS_ERROR;
> + }
> +
> + /* Parent */
> +
> + ret = waitpid(pid, &status, 0);
> + if (ret < 0) {
> + fwts_log_error(fw, "Failed waitpid on hook script, "
> + "errno=%d (%s)\n", errno, strerror(errno));
> +
> + /* Nuke child to be double sure it's gone */
> + (void)kill(pid, SIGKILL);
> + } else if (WIFEXITED(status)) {
> + fwts_log_info(fw, "Hook script '%s' returned %d\n",
> + hook, WEXITSTATUS(status));
> + return WEXITSTATUS(status) ? FWTS_ERROR : FWTS_OK;
> + } else {
> + fwts_log_error(fw, "Hook script exited abnormally\n");
> + }
> + return FWTS_ERROR;
> +}
> +
> /* Detect the best available power method */
> static void detect_pm_method(fwts_pm_method_vars *fwts_settings)
> {
> @@ -146,6 +192,7 @@ static int wrap_pmutils_do_suspend(fwts_pm_method_vars *fwts_settings,
> static int s3_do_suspend_resume(fwts_framework *fw,
> int *hw_errors,
> int *pm_errors,
> + int *hook_errors,
> int delay,
> int percent)
> {
> @@ -262,6 +309,13 @@ static int s3_do_suspend_resume(fwts_framework *fw,
> }
> }
>
> + if (s3_hook && (s3_hook_exec(fw, s3_hook) != FWTS_OK)) {
> + fwts_failed(fw, LOG_LEVEL_MEDIUM, "HookScriptFailed",
> + "Error executing hook script '%s', S3 cycles "
> + "will be aborted.", s3_hook);
> + (*hook_errors)++;
> + }
> +
> if (duration < delay) {
> (*pm_errors)++;
> fwts_failed(fw, LOG_LEVEL_MEDIUM, "ShortSuspend",
> @@ -432,6 +486,7 @@ static int s3_test_multiple(fwts_framework *fw)
> int klog_errors = 0;
> int hw_errors = 0;
> int pm_errors = 0;
> + int hook_errors = 0;
> int klog_oopses = 0;
> int klog_warn_ons = 0;
> int suspend_too_long = 0;
> @@ -449,20 +504,27 @@ static int s3_test_multiple(fwts_framework *fw)
> if (s3_multiple == 1)
> fwts_log_info(fw, "Defaulted to 1 test, use --s3-multiple=N to run more S3 cycles\n");
>
> - for (i=0; i<s3_multiple; i++) {
> + for (i = 0; i < s3_multiple; i++) {
> struct timeval tv;
> - int percent = (i * 100) / s3_multiple;
> + int ret, percent = (i * 100) / s3_multiple;
> fwts_list *klog_pre, *klog_post, *klog_diff;
> fwts_log_info(fw, "S3 cycle %d of %d\n",i+1,s3_multiple);
>
> if ((klog_pre = fwts_klog_read()) == NULL)
> fwts_log_error(fw, "Cannot read kernel log.");
>
> - if (s3_do_suspend_resume(fw, &hw_errors, &pm_errors, s3_sleep_delay, percent) == FWTS_OUT_OF_MEMORY) {
> + ret = s3_do_suspend_resume(fw, &hw_errors, &pm_errors,
> + &hook_errors, s3_sleep_delay,
> + percent);
> + if (ret == FWTS_OUT_OF_MEMORY) {
> fwts_log_error(fw, "S3 cycle %d failed - out of memory error.", i+1);
> fwts_klog_free(klog_pre);
> break;
> }
> + if (hook_errors > 0) {
> + fwts_klog_free(klog_pre);
> + break;
> + }
>
> if ((klog_post = fwts_klog_read()) == NULL)
> fwts_log_error(fw, "Cannot re-read kernel log.");
> @@ -497,7 +559,7 @@ static int s3_test_multiple(fwts_framework *fw)
> }
> }
>
> - fwts_log_info(fw, "Completed %d S3 cycle(s)\n", s3_multiple);
> + fwts_log_info(fw, "Completed S3 cycle(s)\n");
>
> if (klog_errors > 0)
> fwts_log_info(fw, "Found %d errors in kernel log.", klog_errors);
> @@ -591,6 +653,23 @@ static int s3_options_check(fwts_framework *fw)
> fprintf(stderr, "--s3-resume-time too small.\n");
> return FWTS_ERROR;
> }
> + if (s3_hook) {
> + struct stat statbuf;
> + int ret;
> +
> + ret = lstat(s3_hook, &statbuf);
> + if (ret < 0) {
> + fprintf(stderr, "--s3-resume-hook file '%s' cannot "
> + "be checked, errno=%d (%s)\n",
> + s3_hook, errno, strerror(errno));
> + return FWTS_ERROR;
> + }
> + if ((statbuf.st_mode & S_IXUSR) == 0) {
> + fprintf(stderr, "--s3-resume-hook file '%s' is not "
> + "executable\n", s3_hook);
> + return FWTS_ERROR;
> + }
> + }
> return FWTS_OK;
> }
>
> @@ -640,6 +719,9 @@ static int s3_options_handler(fwts_framework *fw, int argc, char * const argv[],
> case 10:
> s3_hybrid = true;
> break;
> + case 11:
> + s3_hook = optarg;
> + break;
> }
> }
> return FWTS_OK;
> @@ -657,6 +739,7 @@ static fwts_option s3_options[] = {
> { "s3-suspend-time", "", 1, "Maximum expected suspend time in seconds, e.g. --s3-suspend-time=3.5" },
> { "s3-resume-time", "", 1, "Maximum expected resume time in seconds, e.g. --s3-resume-time=5.1" },
> { "s3-hybrid", "", 0, "Run S3 with hybrid sleep, i.e. saving system states as S4 does." },
> + { "s3-resume-hook hook","", 1, "Run a hook script after each S3 resume, 0 exit indicates success." },
> { NULL, NULL, 0, NULL }
> };
>
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index c8f2af0..2f15513 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -376,7 +376,7 @@ static int s4_test_multiple(fwts_framework *fw)
> if (s4_multiple == 1)
> fwts_log_info(fw, "Defaulted to run 1 test, run --s4-multiple=N to run more S4 cycles\n");
>
> - for (i=0; i<s4_multiple; i++) {
> + for (i = 0; i < s4_multiple; i++) {
> struct timeval tv;
> int failed_alloc_image = 0;
> int percent = (i * 100) / s4_multiple;
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index f0a44e0..726623c 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -1063,7 +1063,7 @@ int fwts_acpica_init(fwts_framework *fw)
>
> n = (table->length - sizeof(ACPI_TABLE_HEADER)) / sizeof(uint64_t);
> entries = (uint64_t*)(table->data + sizeof(ACPI_TABLE_HEADER));
> - for (i=0; i<n; i++) {
> + for (i = 0; i < n; i++) {
> fwts_acpi_table_info *tbl;
> if (fwts_acpi_find_table_by_addr(fw, entries[i], &tbl) != FWTS_OK)
> return FWTS_ERROR;
> @@ -1098,7 +1098,7 @@ int fwts_acpica_init(fwts_framework *fw)
>
> n = (table->length - sizeof(ACPI_TABLE_HEADER)) / sizeof(uint32_t);
> entries = (uint32_t*)(table->data + sizeof(ACPI_TABLE_HEADER));
> - for (i=0; i<n; i++) {
> + for (i = 0; i < n; i++) {
> fwts_acpi_table_info *tbl;
> if (fwts_acpi_find_table_by_addr(fw, entries[i], &tbl) != FWTS_OK)
> return FWTS_ERROR;
> diff --git a/src/bios/bios32/bios32.c b/src/bios/bios32/bios32.c
> index 6aaeed9..e7f086f 100644
> --- a/src/bios/bios32/bios32.c
> +++ b/src/bios/bios32/bios32.c
> @@ -64,7 +64,7 @@ static int bios32_test1(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0; i<BIOS32_SD_REGION_SIZE; i+= 16) {
> + for (i = 0; i < BIOS32_SD_REGION_SIZE; i+= 16) {
> if ((*(mem+i) == '_') &&
> (*(mem+i+1) == '3') &&
> (*(mem+i+2) == '2') &&
> diff --git a/src/bios/bios_info/bios_info.c b/src/bios/bios_info/bios_info.c
> index c974a81..a9297a5 100644
> --- a/src/bios/bios_info/bios_info.c
> +++ b/src/bios/bios_info/bios_info.c
> @@ -55,7 +55,7 @@ static int bios_info_test1(fwts_framework *fw)
> char path[PATH_MAX];
> int i;
>
> - for (i=0; bios_info[i].dmi_field != NULL; i++) {
> + for (i = 0; bios_info[i].dmi_field != NULL; i++) {
> char *data;
> snprintf(path, sizeof(path), "/sys/class/dmi/id/%s",
> bios_info[i].dmi_field);
> diff --git a/src/bios/ebdadump/ebdadump.c b/src/bios/ebdadump/ebdadump.c
> index 4e61fee..437f225 100644
> --- a/src/bios/ebdadump/ebdadump.c
> +++ b/src/bios/ebdadump/ebdadump.c
> @@ -31,7 +31,7 @@ static void ebdadump_data(fwts_framework *fw,
> char buffer[128];
> int i;
>
> - for (i=0; i<length; i+=16) {
> + for (i = 0; i < length; i += 16) {
> fwts_dump_raw_data(buffer, sizeof buffer, data+i, offset+i, 16);
> fwts_log_info_verbatim(fw, "%s", buffer);
> }
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 0e33e6f..bef4aff 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -64,7 +64,7 @@ static char *cache_to_string(int type)
> static char str[1024];
> memset(str, 0, 1024);
>
> - if (type & UNCACHED || type==0)
> + if (type & UNCACHED || type == 0)
> strcat(str," Uncached");
> if (type & WRITE_BACK)
> strcat(str," Write-Back");
> @@ -362,7 +362,7 @@ static int validate_iomem(fwts_framework *fw)
> int i;
> bool skiperror = false;
>
> - if (fgets(buffer, 4095, file)==NULL)
> + if (fgets(buffer, 4095, file) == NULL)
> break;
>
> fwts_chop_newline(buffer);
> @@ -377,15 +377,15 @@ static int validate_iomem(fwts_framework *fw)
> }
>
> /* then: check the pci depth */
> - for (i=0; i<pcidepth*2; i++) {
> - if (buffer[i]!=' ') {
> - pcidepth = i/2;
> + for (i = 0; i < pcidepth * 2; i++) {
> + if (buffer[i] != ' ') {
> + pcidepth = i / 2;
> break;
> }
> }
> c = &buffer[pcidepth*2];
> /* sub entry to a main entry -> skip */
> - if (*c==' ')
> + if (*c == ' ')
> continue;
>
> start = strtoull(c, NULL, 16);
> @@ -398,7 +398,7 @@ static int validate_iomem(fwts_framework *fw)
> c2 = strstr(c, " : ");
> if (!c2)
> continue;
> - c2+=3;
> + c2 += 3;
>
> /* exception: 640K - 1Mb range we ignore */
> if (start >= 640*1024 && end <= 1024*1024)
> @@ -414,7 +414,7 @@ static int validate_iomem(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - if ((type & type_mustnot)!=0) {
> + if ((type & type_mustnot) != 0) {
> failed++;
> fwts_failed(fw, LOG_LEVEL_MEDIUM,
> "MTRRIncorrectAttr",
> diff --git a/src/bios/multiproc/mpcheck.c b/src/bios/multiproc/mpcheck.c
> index 0754b8a..24941f1 100644
> --- a/src/bios/multiproc/mpcheck.c
> +++ b/src/bios/multiproc/mpcheck.c
> @@ -185,7 +185,7 @@ static int mpcheck_test_bus_entries(fwts_framework *fw)
> fwts_mp_bus_entry *bus_entry =
> fwts_list_data(fwts_mp_bus_entry *, entry);
>
> - for (i=0; bus_types[i] != NULL; i++) {
> + for (i = 0; bus_types[i] != NULL; i++) {
> if (strncmp(bus_types[i], (char*)bus_entry->bus_type, strlen(bus_types[i])) == 0)
> break;
> }
> diff --git a/src/bios/pciirq/pciirq.c b/src/bios/pciirq/pciirq.c
> index 7bd8617..f9c16c8 100644
> --- a/src/bios/pciirq/pciirq.c
> +++ b/src/bios/pciirq/pciirq.c
> @@ -67,7 +67,7 @@ static const char *pciirq_reserved(uint8_t *data)
>
> *buf = '\0';
>
> - for (i=0; i < RESERVED_SIZE; i++) {
> + for (i = 0; i < RESERVED_SIZE; i++) {
> snprintf(tmp, sizeof(tmp), "%s0x%2.2x", *buf ? ",": "", data[i]);
> strcat(buf, tmp);
> }
> @@ -117,7 +117,7 @@ static int pciirq_test1(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0; i < PCIIRQ_REGION_SIZE; i+= 16) {
> + for (i = 0; i < PCIIRQ_REGION_SIZE; i+= 16) {
> pci_irq_routing_table *pciirq = (pci_irq_routing_table*)(mem+i);
> if ((memcmp(pciirq->signature, "$PIR", 4) == 0) &&
> (fwts_checksum(mem+i, pciirq->table_size) == 0)) {
> diff --git a/src/bios/pnp/pnp.c b/src/bios/pnp/pnp.c
> index f3bba73..ebbba34 100644
> --- a/src/bios/pnp/pnp.c
> +++ b/src/bios/pnp/pnp.c
> @@ -92,7 +92,7 @@ static int pnp_test1(fwts_framework *fw)
>
> fwts_log_nl(fw);
>
> - for (i=0; i < PNP_REGION_SIZE; i+= 16) {
> + for (i = 0; i < PNP_REGION_SIZE; i+= 16) {
> pnp_header *pnp = (pnp_header*)(mem+i);
> if ((memcmp(pnp->signature, PNP_SIGNATURE, 4) == 0) &&
> (fwts_checksum(mem+i, sizeof(pnp_header)) == 0)) {
> diff --git a/src/bios/romdump/romdump.c b/src/bios/romdump/romdump.c
> index 3b7d08e..4cf8525 100644
> --- a/src/bios/romdump/romdump.c
> +++ b/src/bios/romdump/romdump.c
> @@ -35,7 +35,7 @@ static void romdump_data(fwts_framework *fw, uint8_t *data,
> char buffer[128];
> int i;
>
> - for (i=0; i<length; i+=16) {
> + for (i = 0; i < length; i += 16) {
> fwts_dump_raw_data(buffer, sizeof(buffer), data+i, offset+i, 16);
> fwts_log_info_verbatim(fw, "%s", buffer);
> }
> @@ -51,7 +51,7 @@ static int romdump_test1(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0; i<BIOS_ROM_REGION_SIZE; i+= 512) {
> + for (i = 0; i < BIOS_ROM_REGION_SIZE; i += 512) {
> if ((*(mem+i) == 0x55) && (*(mem+i+1) == 0xaa)) {
> int length = *(mem+i+2) << 9;
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index f88f25e..84d931e 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -887,7 +887,7 @@ static void dmi_str_check_index(fwts_framework *fw,
> }
>
> /* Scan for known BIOS defaults that vendors forget to set */
> - for (j=0; dmi_patterns[j].label != NULL; j++) {
> + for (j = 0; dmi_patterns[j].label != NULL; j++) {
> if (dmi_patterns[j].field &&
> (strcmp(dmi_patterns[j].field, field) == 0) &&
> (strcmp(dmi_patterns[j].value, data) == 0)) {
> diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
> index ead67e0..9b33267 100644
> --- a/src/lib/src/fwts_acpi_object_eval.c
> +++ b/src/lib/src/fwts_acpi_object_eval.c
> @@ -407,7 +407,7 @@ void fwts_acpi_object_evaluate_report_error(
> int i;
>
> /* Generic cases */
> - for (i=0; errors[i].error_type; i++) {
> + for (i = 0; errors[i].error_type; i++) {
> if (status == errors[i].status) {
> fwts_failed(fw, errors[i].level, errors[i].error_type,
> "Detected error '%s' when evaluating '%s'.",
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index f9c9ffa..a79f297 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -271,7 +271,7 @@ int fwts_acpi_free_tables(void)
> {
> int i;
>
> - for (i=0;i<ACPI_MAX_TABLES;i++) {
> + for (i = 0;i < ACPI_MAX_TABLES; i++) {
> if (tables[i].data) {
> fwts_low_free(tables[i].data);
> memset(&tables[i], 0, sizeof(fwts_acpi_table_info));
> @@ -458,7 +458,7 @@ static int fwts_acpi_load_tables_from_firmware(fwts_framework *fw)
> fwts_acpi_add_table("XSDT", xsdt, (uint64_t)rsdp->xsdt_address,
> xsdt->header.length, FWTS_ACPI_TABLE_FROM_FIRMWARE);
> num_entries = (xsdt->header.length - sizeof(fwts_acpi_table_header)) / 8;
> - for (i=0; i<num_entries; i++) {
> + for (i = 0; i < num_entries; i++) {
> if (xsdt->entries[i]) {
> if ((header = fwts_acpi_load_table((off_t)xsdt->entries[i])) != NULL) {
> if (strncmp("FACP", header->signature, 4) == 0)
> @@ -481,7 +481,7 @@ static int fwts_acpi_load_tables_from_firmware(fwts_framework *fw)
> fwts_acpi_add_table("RSDT", rsdt, (uint64_t)rsdp->rsdt_address,
> rsdt->header.length, FWTS_ACPI_TABLE_FROM_FIRMWARE);
> num_entries = (rsdt->header.length - sizeof(fwts_acpi_table_header)) / 4;
> - for (i=0; i<num_entries; i++) {
> + for (i = 0; i < num_entries; i++) {
> if (rsdt->entries[i]) {
> if ((header = fwts_acpi_load_table((off_t)rsdt->entries[i])) != NULL) {
> if (strncmp("FACP", header->signature, 4) == 0)
> @@ -1023,7 +1023,7 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0,j=0; j<count ;i++)
> + for (i = 0,j = 0; j < count; i++)
> if (fwts_acpi_get_table(fw, i, &table) == FWTS_OK)
> if (table && fwts_acpi_table_fixable(table))
> rsdt->entries[j++] = (uint32_t)table->addr;
> @@ -1060,7 +1060,7 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0,j=0; j<count ;i++)
> + for (i = 0,j = 0; j < count; i++)
> if (fwts_acpi_get_table(fw, i, &table) == FWTS_OK)
> if (table && fwts_acpi_table_fixable(table))
> xsdt->entries[j++] = table->addr;
> @@ -1215,7 +1215,7 @@ int fwts_acpi_find_table(fwts_framework *fw, const char *name, const int which,
> return ret;
> }
>
> - for (i=0;i<ACPI_MAX_TABLES;i++) {
> + for (i = 0;i < ACPI_MAX_TABLES; i++) {
> if (tables[i].data == NULL)
> break;
> if ((strcmp(tables[i].name, name) == 0) &&
> @@ -1246,7 +1246,7 @@ int fwts_acpi_find_table_by_addr(fwts_framework *fw, const uint64_t addr, fwts_a
> return ret;
> }
>
> - for (i=0;i<ACPI_MAX_TABLES;i++) {
> + for (i = 0; i < ACPI_MAX_TABLES; i++) {
> if (tables[i].data == NULL)
> break;
> if (tables[i].addr == addr) {
> diff --git a/src/lib/src/fwts_args.c b/src/lib/src/fwts_args.c
> index fec656f..23eb0c8 100644
> --- a/src/lib/src/fwts_args.c
> +++ b/src/lib/src/fwts_args.c
> @@ -79,7 +79,7 @@ int fwts_args_add_options(
> if ((options_table = calloc(1, sizeof(fwts_options_table))) == NULL)
> return FWTS_ERROR;
>
> - for (n=0; options[n].long_name != NULL; n++)
> + for (n = 0; options[n].long_name != NULL; n++)
> ;
>
> total_options += n;
> @@ -124,7 +124,7 @@ int fwts_args_parse(fwts_framework *fw, const int argc, char * const argv[])
> fwts_list_foreach(item, &options_list) {
> options_table = fwts_list_data(fwts_options_table *, item);
>
> - for (i=0; i<options_table->num_options; i++, n++) {
> + for (i = 0; i < options_table->num_options; i++, n++) {
> char *short_name = options_table->options[i].short_name;
> size_t len;
>
> @@ -291,7 +291,7 @@ void fwts_args_show_options(void)
> fwts_options_table *options_table;
> options_table = fwts_list_data(fwts_options_table *, item);
>
> - for (i=0; i<options_table->num_options; i++) {
> + for (i = 0; i < options_table->num_options; i++) {
> fwts_list_add_ordered(&sorted_options,
> &options_table->options[i], fwts_args_compare_options);
> }
> @@ -307,7 +307,7 @@ void fwts_args_show_options(void)
> *ptr = '\0';
> if ((option->short_name != NULL) && *(option->short_name)) {
> char ch;
> - for (i=0; (ch = option->short_name[i]) != '\0'; i++) {
> + for (i = 0; (ch = option->short_name[i]) != '\0'; i++) {
> if (ch != ':') {
> *ptr++ = '-';
> *ptr++ = ch;
> diff --git a/src/lib/src/fwts_checksum.c b/src/lib/src/fwts_checksum.c
> index 2bd4194..27ab882 100644
> --- a/src/lib/src/fwts_checksum.c
> +++ b/src/lib/src/fwts_checksum.c
> @@ -28,7 +28,7 @@ uint8_t fwts_checksum(const uint8_t *data, const int length)
> int i;
> uint8_t checksum = 0;
>
> - for (i=0; i < length; i++)
> + for (i = 0; i < length; i++)
> checksum += *data++;
>
> return checksum;
> diff --git a/src/lib/src/fwts_cpu.c b/src/lib/src/fwts_cpu.c
> index 9dbfaaf..8033090 100644
> --- a/src/lib/src/fwts_cpu.c
> +++ b/src/lib/src/fwts_cpu.c
> @@ -294,7 +294,7 @@ static void fwts_cpu_consume_kill(void)
> int i;
> siginfo_t info;
>
> - for (i=0;i<fwts_cpu_num;i++) {
> + for (i = 0;i < fwts_cpu_num; i++) {
> if (fwts_cpu_pids[i] != 0) {
> kill(fwts_cpu_pids[i], SIGUSR1);
> waitid(P_PID, fwts_cpu_pids[i], &info, WEXITED);
> @@ -548,7 +548,7 @@ int fwts_cpu_consume_start(void)
> return FWTS_ERROR;
>
> fwts_sig_handler_set(SIGINT, fwts_cpu_sigint_handler, NULL);
> - for (i=0;i<fwts_cpu_num;i++) {
> + for (i = 0; i < fwts_cpu_num; i++) {
> pid_t pid;
>
> pid = fork();
> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
> index d197400..1a95682 100644
> --- a/src/lib/src/fwts_dump.c
> +++ b/src/lib/src/fwts_dump.c
> @@ -146,7 +146,7 @@ static int dump_acpi_table(fwts_acpi_table_info *table, FILE *fp)
>
> fprintf(fp, "%s @ 0x%lx\n", table->name, (unsigned long)table->addr);
>
> - for (n = 0; n < table->length; n+=16) {
> + for (n = 0; n < table->length; n += 16) {
> int left = table->length - n;
> fwts_dump_raw_data(buffer, sizeof(buffer), table->data + n, n, left > 16 ? 16 : left);
> fprintf(fp, "%s\n", buffer);
> @@ -168,7 +168,7 @@ static int dump_acpi_tables(fwts_framework *fw)
> if ((fp = fopen("acpidump.log", "w")) == NULL)
> return FWTS_ERROR;
>
> - for (i=0;;i++) {
> + for (i = 0;; i++) {
> fwts_acpi_table_info *table;
>
> int ret = fwts_acpi_get_table(fw, i, &table);
> diff --git a/src/lib/src/fwts_gpe.c b/src/lib/src/fwts_gpe.c
> index e1166c2..b09232f 100644
> --- a/src/lib/src/fwts_gpe.c
> +++ b/src/lib/src/fwts_gpe.c
> @@ -104,7 +104,7 @@ int fwts_gpe_delta(int **gpe_delta, const fwts_gpe *start, const fwts_gpe *end,
> if (((*gpe_delta) = calloc(n, sizeof(int))) == NULL)
> return FWTS_ERROR;
>
> - for (i=0;i<n;i++) {
> + for (i = 0; i < n; i++) {
> (*gpe_delta)[i] = end[i].count - start[i].count;
> }
>
> @@ -124,7 +124,7 @@ int fwts_gpe_delta_get(fwts_framework *fw,
> return FWTS_ERROR;
> } else {
> int i;
> - for (i=0;i<gpe_count;i++) {
> + for (i = 0; i < gpe_count; i++) {
> if ((strcmp(gpes_end[i].name, "sci") == 0) && (deltas[i] > 0))
> *sci += deltas[i];
> if ((strncmp(gpes_end[i].name, "gpe", 3) == 0) && (deltas[i] > 0))
> @@ -150,7 +150,7 @@ void fwts_gpe_test(fwts_framework *fw, const fwts_gpe *gpes_start, const fwts_gp
> fwts_log_error(fw, "Cannot calculate GPE delta, out of memory.");
> else {
> int i;
> - for (i=0;i<gpe_count;i++) {
> + for (i = 0; i < gpe_count; i++) {
> if ((strcmp(gpes_end[i].name, "sci") == 0) && (deltas[i] > 0)) {
> fwts_log_info(fw, "Got %d SCI interrupt(s).", deltas[i]);
> sci += deltas[i];
> diff --git a/src/lib/src/fwts_klog.c b/src/lib/src/fwts_klog.c
> index d7aa500..7a5c498 100644
> --- a/src/lib/src/fwts_klog.c
> +++ b/src/lib/src/fwts_klog.c
> @@ -133,10 +133,10 @@ char *fwts_klog_remove_timestamp(char *text)
> ptr += 3;
>
> if (*ptr == '[')
> - while (*ptr && *ptr !=']')
> + while (*ptr && *ptr != ']')
> ptr++;
> if (*ptr == ']')
> - ptr+=2; /* Skip ] and trailing space */
> + ptr += 2; /* Skip ] and trailing space */
>
> return ptr;
> }
> diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
> index d448cd5..cb25a33 100644
> --- a/src/lib/src/fwts_log.c
> +++ b/src/lib/src/fwts_log.c
> @@ -204,7 +204,7 @@ void fwts_log_print_fields(void)
> fwts_log_field field = 1;
>
> printf("Available fields: ");
> - for (field=1; ; field <<= 1) {
> + for (field = 1; ; field <<= 1) {
> char *str = fwts_log_field_to_str(field);
> if (strcmp(str, LOG_UNKOWN_FIELD) == 0)
> break;
> @@ -244,7 +244,7 @@ fwts_log_field fwts_log_str_to_field(const char *text)
> { NULL, 0 }
> };
>
> - for (i=0; mappings[i].text != NULL; i++)
> + for (i = 0; mappings[i].text != NULL; i++)
> if (strcmp(mappings[i].text, text) == 0)
> return mappings[i].field;
> return 0;
> @@ -577,7 +577,7 @@ char *fwts_log_get_filenames(const char *filename, const fwts_log_type type)
> char *tmp;
> size_t len = 0;
>
> - for (i=0; i<32; i++) {
> + for (i = 0; i < 32; i++) {
> fwts_log_type mask = 1 << i;
> if (type & mask) {
> if ((tmp = fwts_log_filename(filename, mask)) == NULL) {
> @@ -641,7 +641,7 @@ fwts_log *fwts_log_open(
> * and open the log file with the appropriate ops to perform
> * the logging
> */
> - for (i=0; i<32; i++) {
> + for (i = 0; i < 32; i++) {
> fwts_log_type mask = 1 << i; /* The log type for this iteration */
>
> /* If set then go and open up a log for this log type */
> diff --git a/src/lib/src/fwts_multiproc.c b/src/lib/src/fwts_multiproc.c
> index ed728ed..07dfd5d 100644
> --- a/src/lib/src/fwts_multiproc.c
> +++ b/src/lib/src/fwts_multiproc.c
> @@ -69,7 +69,7 @@ static int fwts_mp_get_address(uint32_t *phys_addr)
> }
> }
>
> - for (i=0;regions[i].end; i++) {
> + for (i = 0; regions[i].end; i++) {
> void *mem;
> uint8_t *ptr;
> off_t start = regions[i].start;
> @@ -78,7 +78,7 @@ static int fwts_mp_get_address(uint32_t *phys_addr)
> if ((mem = fwts_mmap(start, size)) == FWTS_MAP_FAILED)
> continue;
>
> - for (ptr = mem; ptr < (uint8_t*)mem + size; ptr+=16) {
> + for (ptr = mem; ptr < (uint8_t*)mem + size; ptr += 16) {
> if ((*ptr == '_') &&
> (*(ptr + 1) == 'M') &&
> (*(ptr + 2) == 'P') &&
> diff --git a/src/lib/src/fwts_smbios.c b/src/lib/src/fwts_smbios.c
> index 7bc6320..8d0ea39 100644
> --- a/src/lib/src/fwts_smbios.c
> +++ b/src/lib/src/fwts_smbios.c
> @@ -117,7 +117,7 @@ static void *fwts_smbios_find_entry_bios(fwts_framework *fw, fwts_smbios_entry *
> return NULL;
> }
>
> - for (i=0; i<FWTS_SMBIOS_REGION_SIZE; i+= 16) {
> + for (i = 0; i < FWTS_SMBIOS_REGION_SIZE; i += 16) {
> /* SMBIOS entry point */
> if ((*(mem+i) == '_') &&
> (*(mem+i+1) == 'S') &&
> @@ -164,7 +164,7 @@ static void *fwts_smbios30_find_entry_bios(fwts_framework *fw, fwts_smbios30_ent
> return NULL;
> }
>
> - for (i=0; i < FWTS_SMBIOS_REGION_SIZE; i += 16) {
> + for (i = 0; i < FWTS_SMBIOS_REGION_SIZE; i += 16) {
> /* SMBIOS30 entry point */
> if ((*(mem+i) == '_') &&
> (*(mem+i+1) == 'S') &&
> diff --git a/src/lib/src/fwts_summary.c b/src/lib/src/fwts_summary.c
> index a3c0c4f..0306275 100644
> --- a/src/lib/src/fwts_summary.c
> +++ b/src/lib/src/fwts_summary.c
> @@ -68,7 +68,7 @@ int fwts_summary_init(void)
> int i;
>
> /* initialise list of summary items for all error levels */
> - for (i=0;i<SUMMARY_MAX;i++)
> + for (i = 0; i < SUMMARY_MAX; i++)
> if ((fwts_summaries[i] = fwts_list_new()) == NULL) {
> fwts_summary_deinit();
> return FWTS_ERROR;
> @@ -98,7 +98,7 @@ void fwts_summary_deinit(void)
> {
> int i;
>
> - for (i=0;i<SUMMARY_MAX;i++)
> + for (i = 0; i < SUMMARY_MAX;i++)
> if (fwts_summaries[i])
> fwts_list_free(fwts_summaries[i], fwts_summary_item_free);
> }
> diff --git a/src/lib/src/fwts_text_list.c b/src/lib/src/fwts_text_list.c
> index 1a2f04b..c02f82d 100644
> --- a/src/lib/src/fwts_text_list.c
> +++ b/src/lib/src/fwts_text_list.c
> @@ -98,7 +98,7 @@ fwts_list *fwts_list_from_text(const char *text)
> char *str;
> int len;
>
> - while (*ptr && *ptr !='\n')
> + while (*ptr && *ptr != '\n')
> ptr++;
>
> len = ptr - start;
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 0e3084c..1f9d31f 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -179,7 +179,7 @@ size_t fwts_uefi_str16len(const uint16_t *str)
> {
> int i;
>
> - for (i=0; *str; i++, str++)
> + for (i = 0; *str; i++, str++)
> ;
> return i;
> }
> diff --git a/src/uefi/csm/csm.c b/src/uefi/csm/csm.c
> index c4cd49a..8cbec57 100644
> --- a/src/uefi/csm/csm.c
> +++ b/src/uefi/csm/csm.c
> @@ -61,7 +61,7 @@ static int csm_test1(fwts_framework *fw)
> return FWTS_ERROR;
> }
>
> - for (i=0; i<BIOS_ROM_REGION_SIZE; i+= 512) {
> + for (i = 0; i < BIOS_ROM_REGION_SIZE; i += 512) {
> if ((*(optROM+i) == 0x55) && (*(optROM+i+1) == 0xaa)) {
> uint32_t length = *(optROM+i+2) << 9;
> uint32_t ROMstart = BIOS_ROM_REGION_START+i;
>
More information about the fwts-devel
mailing list