Message ID | 1367918081-19096-1-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 05/07/2013 05:14 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Coverity CID #997309: Same on both sides (CONSTANT_EXPRESSION_RESULT) > > Fix stupid typos where we are comparing info2->cur_state with itself > rather than info1->cur_state. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/fan/fan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c > index 184da1a..3e61259 100644 > --- a/src/acpi/fan/fan.c > +++ b/src/acpi/fan/fan.c > @@ -216,13 +216,13 @@ static int fan_test2(fwts_framework *fw) > info1->name, info1->cur_state, info2->cur_state); > changed = true; > } > - if (info2->cur_state > info2->cur_state) { > + if (info2->cur_state > info1->cur_state) { > fwts_passed(fw, "Fan %s current state increased from %d to %d " > "while CPUs were busy.", > info1->name, info1->cur_state, info2->cur_state); > changed = true; > } > - if (info2->cur_state == info2->cur_state) > + if (info2->cur_state == info1->cur_state) > fwts_log_info(fw, "Fan %s current state did not change from value %d " > "while CPUs were busy.", > info1->name, info1->cur_state); > Acked-by: Alex Hung <alex.hung@canonical.com>
On Tue, May 7, 2013 at 5:14 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Coverity CID #997309: Same on both sides (CONSTANT_EXPRESSION_RESULT) > > Fix stupid typos where we are comparing info2->cur_state with itself > rather than info1->cur_state. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/fan/fan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c > index 184da1a..3e61259 100644 > --- a/src/acpi/fan/fan.c > +++ b/src/acpi/fan/fan.c > @@ -216,13 +216,13 @@ static int fan_test2(fwts_framework *fw) > info1->name, info1->cur_state, info2->cur_state); > changed = true; > } > - if (info2->cur_state > info2->cur_state) { > + if (info2->cur_state > info1->cur_state) { > fwts_passed(fw, "Fan %s current state increased from %d to %d " > "while CPUs were busy.", > info1->name, info1->cur_state, info2->cur_state); > changed = true; > } > - if (info2->cur_state == info2->cur_state) > + if (info2->cur_state == info1->cur_state) > fwts_log_info(fw, "Fan %s current state did not change from value %d " > "while CPUs were busy.", > info1->name, info1->cur_state); > -- > 1.8.1.2 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c index 184da1a..3e61259 100644 --- a/src/acpi/fan/fan.c +++ b/src/acpi/fan/fan.c @@ -216,13 +216,13 @@ static int fan_test2(fwts_framework *fw) info1->name, info1->cur_state, info2->cur_state); changed = true; } - if (info2->cur_state > info2->cur_state) { + if (info2->cur_state > info1->cur_state) { fwts_passed(fw, "Fan %s current state increased from %d to %d " "while CPUs were busy.", info1->name, info1->cur_state, info2->cur_state); changed = true; } - if (info2->cur_state == info2->cur_state) + if (info2->cur_state == info1->cur_state) fwts_log_info(fw, "Fan %s current state did not change from value %d " "while CPUs were busy.", info1->name, info1->cur_state);