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: Thu, 05 Jun 2025 11:32:10 +0530 [thread overview]
Message-ID: <68169d1c553d9f8f587318712fb60665@linux.ibm.com> (raw)
In-Reply-To: <CH3PR10MB6834564CB474D40E85F36552BC6DA@CH3PR10MB6834.namprd10.prod.outlook.com>
On 2025-06-04 01:17, Alec Brown wrote:
> On Thu, May 29, 2025 at 6:59 AM, Avnish Chouhan <avnish@linux.ibm.com>
> wrote:
>> On 2025-05-21 18:21, grub-devel-request@gnu.org wrote:
[...]
>> > + while (*separator == ' ' || *separator == '\t');
>>
>> What's the use of this while condition? It may result in an infinite
>> loop...
>>
>
> The purpose of this while loop is to remove any additional spaces or
> tabs
> separating the key from the value. I don't believe this would result in
> an
> infinite loop unless the rest of memory was a space or tab. However, an
> issue
> I do see is we aren't checking if there is a value after removing the
> excess
> spaces and tabs in the loop. I'll fix this.
Hi Alec,
In my opinion, if we have any of the given condition evaluates as
'True', it will be an infinite loop. We are't incriminating the pointer
and we will be in a loop forever if "*separator == ' ' or *separator ==
'\t'" evaluates 'True'.
If I understood the purpose of this loop correctly, I would do something
like this below:
while (*separator == ' ' || *separator == '\t')
{
...
separator++;
}
Thank you!
Regards,
Avnish Chouhan
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-06-05 6:03 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 [this message]
2025-06-05 13:57 ` Alec Brown via Grub-devel
2025-06-06 8:45 ` Avnish Chouhan
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=68169d1c553d9f8f587318712fb60665@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.