Message ID | 20170413095046.27651-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2017-04-13 02:50 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The previous if block also handles the !summary_item_found condition > so move the statement into this if block. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_summary.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/lib/src/fwts_summary.c b/src/lib/src/fwts_summary.c > index 41008733..82339ec0 100644 > --- a/src/lib/src/fwts_summary.c > +++ b/src/lib/src/fwts_summary.c > @@ -163,11 +163,10 @@ int fwts_summary_add( > return FWTS_ERROR; > } > fwts_chop_newline(summary_item->text); > - } > > - /* And append new item if not done so already */ > - if (!summary_item_found) > + /* And append new item if not done so already */ > fwts_list_append(fwts_summaries[index], summary_item); > + } > > return FWTS_OK; > } > Acked-by: Alex Hung <alex.hung@canonical.com>
On 04/13/2017 05:50 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The previous if block also handles the !summary_item_found condition > so move the statement into this if block. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_summary.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/lib/src/fwts_summary.c b/src/lib/src/fwts_summary.c > index 41008733..82339ec0 100644 > --- a/src/lib/src/fwts_summary.c > +++ b/src/lib/src/fwts_summary.c > @@ -163,11 +163,10 @@ int fwts_summary_add( > return FWTS_ERROR; > } > fwts_chop_newline(summary_item->text); > - } > > - /* And append new item if not done so already */ > - if (!summary_item_found) > + /* And append new item if not done so already */ > fwts_list_append(fwts_summaries[index], summary_item); > + } > > return FWTS_OK; > } > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/src/fwts_summary.c b/src/lib/src/fwts_summary.c index 41008733..82339ec0 100644 --- a/src/lib/src/fwts_summary.c +++ b/src/lib/src/fwts_summary.c @@ -163,11 +163,10 @@ int fwts_summary_add( return FWTS_ERROR; } fwts_chop_newline(summary_item->text); - } - /* And append new item if not done so already */ - if (!summary_item_found) + /* And append new item if not done so already */ fwts_list_append(fwts_summaries[index], summary_item); + } return FWTS_OK; }