All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avnish Chouhan <avnish@linux.ibm.com>
To: Alec Brown <alec.r.brown@oracle.com>
Cc: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Subject: Re: : Re: [PATCH v4 2/4] blsuki: Add blscfg command to parse Boot Loader Specification snippets
Date: Fri, 06 Jun 2025 14:15:41 +0530	[thread overview]
Message-ID: <2f703ff31368080e9e093637f960946f@linux.ibm.com> (raw)
In-Reply-To: <CH3PR10MB68346F75101CEE1D878604E2BC6FA@CH3PR10MB6834.namprd10.prod.outlook.com>

Hi Alec,

I believe you're are right. Making "do while" a "while" will not make 
any difference for the infinite scenario.
Adding a check which you mentioned "checking a value after removing the 
excess" will resolve the concerns I raised.
Thank you!

Regards,
Avnish Chouhan

Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>


> Hi Avnish,
> 
> For the loop, we are incrementing the 'separator' pointer but since we 
> are
> using a do-while loop, it's happening before we check the escape 
> condition of
> the loop.
> 
>> If I understood the purpose of this loop correctly, I would do 
>> something
>> like this below:
>> 
>> while (*separator == ' ' || *separator == '\t')
>>    {
>>      ...
>>      separator++;
>>    }
>> 
> 
> We could write it this way but we would still need to increment the 
> 'separator'
> pointer before entering the loop since we just wrote an end of string 
> character
> where the previous space or tab was.
> 
> Alec Brown
> 
>> 
>> Thank you!
>> 
>> Regards,
>> Avnish Chouhan

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

      reply	other threads:[~2025-06-06  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2919.1747831917.8051.grub-devel@gnu.org>
2025-05-29 10:59 ` [PATCH v4 2/4] blsuki: Add blscfg command to parse Boot Loader Specification snippets Avnish Chouhan
2025-06-03 19:47   ` [External] : " Alec Brown via Grub-devel
2025-06-05  6:02     ` Avnish Chouhan
2025-06-05 13:57       ` Alec Brown via Grub-devel
2025-06-06  8:45         ` Avnish Chouhan [this message]

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-all 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=2f703ff31368080e9e093637f960946f@linux.ibm.com \
    --to=avnish@linux.ibm.com \
    --cc=alec.r.brown@oracle.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.