grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v18 12/25] key_protector: Add key protectors framework


From: Gary Lin
Subject: Re: [PATCH v18 12/25] key_protector: Add key protectors framework
Date: Mon, 1 Jul 2024 10:19:22 +0800

On Fri, Jun 28, 2024 at 02:54:53PM +0300, Vladimir 'phcoder' Serbinenko wrote:
> > +  if (protector == NULL || protector->name == NULL || grub_strlen 
> > (protector->name) == 0)
> > +    return GRUB_ERR_BAD_ARGUMENT;
> > +
> Here and in the other places you miss grub_error. Note that the
> message in such technical cases should be left untranslated (no N_
> mark).
> 
Ok. I'll add grub_error to provide the better error messages.

> > +  if (protector == NULL || grub_strlen (protector) == 0)
> 
> Rather than checking strlen just do protector[0] == '\0'

Ah, right. It's more efficient.

Gary Lin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]