public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: supreeth.venkatesh@arm.com
To: Eric Jin <eric.jin@intel.com>, devel@edk2.groups.io
Subject: Re: [edk2-test][Patch 1/1 V2] SctPkg/Tools:Fix incorrect break condition in GetLine
Date: Thu, 04 Apr 2019 20:57:18 +0000	[thread overview]
Message-ID: <63d729381dcc6b4d7721a740b080737bf20d3f42.camel@arm.com> (raw)
In-Reply-To: <65d1b44edf0d9a648e2b96c805ae45c74e432974.camel@arm.com>

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;
> > +    }
> >    }
> >  
> >    //


           reply	other threads:[~2019-04-04 20:57 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <65d1b44edf0d9a648e2b96c805ae45c74e432974.camel@arm.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63d729381dcc6b4d7721a740b080737bf20d3f42.camel@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox