* Re: [edk2-test][Patch 1/1 V2] SctPkg/Tools:Fix incorrect break condition in GetLine
[not found] ` <65d1b44edf0d9a648e2b96c805ae45c74e432974.camel@arm.com>
@ 2019-04-04 20:57 ` supreeth.venkatesh
0 siblings, 0 replies; only message in thread
From: supreeth.venkatesh @ 2019-04-04 20:57 UTC (permalink / raw)
To: Eric Jin, devel
Adding devel@edk2.groups.io.
On Thu, 2019-04-04 at 20:42 +0000, Supreeth Venkatesh wrote:
> On Thu, 2019-04-04 at 10:14 +0800, Eric Jin wrote:
> > Change the continue to break to get the each useful line.
> > Besides above, change EOL to CRLF
> >
> > CC: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Eric Jin <eric.jin@intel.com>
>
> Reviewed-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
>
> Pushed with the commit log modified as below:
> Change the "continue" to "break" to get a useful line and skip
> comments, empty lines.
> Besides above, change EOL to CRLF.
>
>
> Thanks,
> Supreeth
> > ---
> > uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c | 52
> > ++++++++++++++++++++++++++--------------------------
> > 1 file changed, 26 insertions(+), 26 deletions(-)
> >
> > diff --git a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c b/uefi-
> > sct/SctPkg/Tools/Source/GenBin/GenBin.c
> > index f812e5117d14..47b400c2007c 100644
> > --- a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c
> > +++ b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c
> > @@ -1,8 +1,8 @@
> > /** @file
> >
> > Copyright 2006 - 2010 Unified EFI, Inc.<BR>
> > - Copyright (c) 2010 Intel Corporation. All rights reserved.<BR>
> > - Copyright (c) 2018 ARM Ltd. All rights reserved.<BR>
> > + Copyright (c) 2010 - 2019 Intel Corporation. All rights
> > reserved.<BR>
> > + Copyright (c) 2018 ARM Ltd. All rights reserved.<BR>
> >
> > This program and the accompanying materials
> > are licensed and made available under the terms and conditions
> > of
> > the BSD License
> > @@ -33,7 +33,7 @@ Abstract:
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <string.h>
> > -#include <ctype.h>
> > +#include <ctype.h>
> >
> > //
> > // Definitions
> > @@ -51,7 +51,7 @@ PrintUsage (
> > void
> > );
> >
> > -char *
> > +char *
> > Trim (
> > char *String
> > );
> > @@ -161,42 +161,42 @@ PrintUsage (
> > }
> >
> >
> > -char *
> > +char *
> > Trim (
> > char *String
> > )
> > {
> > int Length;
> > - char *end;
> > + char *end;
> >
> > Length = strlen (String);
> >
> > - if (!Length) {
> > - return String;
> > + if (!Length) {
> > + return String;
> > }
> >
> > - end = String + Length - 1;
> > + end = String + Length - 1;
> >
> > //
> > // Remove the space characters from the end of this string
> > //
> > - while (end >= String && isspace (*end)) {
> > - end--;
> > + while (end >= String && isspace (*end)) {
> > + end--;
> > }
> >
> > - *(end + 1) = '\0';
> > -
> > - //
> > - // Remove the space characters from the beginning of this string
> > - //
> > - while (*String && isspace (*String)) {
> > - String++;
> > - }
> > + *(end + 1) = '\0';
> > +
> > + //
> > + // Remove the space characters from the beginning of this string
> > + //
> > + while (*String && isspace (*String)) {
> > + String++;
> > + }
> >
> > //
> > // Done
> > //
> > - return String;
> > + return String;
> > }
> >
> >
> > @@ -226,15 +226,15 @@ GetLine (
> > //
> > // Remove the beginning and ending space characters
> > //
> > - String = Trim (Result);
> > + String = Trim (Result);
> >
> > //
> > - // Skip the empty line and comment line
> > + // Ignore the empty line and comment line
> > //
> > - if ((String[0] == '\0') ||
> > - (String[0] == '#' )) {
> > - continue;
> > - }
> > + if ((String[0] != '\0') &&
> > + (String[0] != '#' )) {
> > + break;
> > + }
> > }
> >
> > //
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-04 20:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190404021418.8280-1-eric.jin@intel.com>
[not found] ` <65d1b44edf0d9a648e2b96c805ae45c74e432974.camel@arm.com>
2019-04-04 20:57 ` [edk2-test][Patch 1/1 V2] SctPkg/Tools:Fix incorrect break condition in GetLine supreeth.venkatesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox