diff mbox series

arm64/xen: Remove duplicate check for arguments

Message ID 20181120113703.GR3513@dell
State New
Headers show
Series arm64/xen: Remove duplicate check for arguments | expand

Commit Message

Lee Jones Nov. 20, 2018, 11:37 a.m. UTC
From: Lee Jones <lee.jones@linaro.org>


arm64/xen: Remove duplicate check for arguments
    
Signed-off-by: Lee Jones <lee.jones@linaro.org>



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

Comments

Vladimir 'phcoder' Serbinenko Nov. 20, 2018, 6:54 p.m. UTC | #1
On Tue, 20 Nov 2018, 14:40 Lee Jones, <lee.jones@linaro.org> wrote:

> From: Lee Jones <lee.jones@linaro.org>

>

> arm64/xen: Remove duplicate check for arguments

>

It's not duplicate because of argc-- right before it

>

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

>

> diff --git a/grub-core/loader/arm64/xen_boot.c

> b/grub-core/loader/arm64/xen_boot.c

> index 1b1dd8c65..5af15c70d 100644

> --- a/grub-core/loader/arm64/xen_boot.c

> +++ b/grub-core/loader/arm64/xen_boot.c

> @@ -404,12 +404,6 @@ grub_cmd_xen_module (grub_command_t cmd

> __attribute__((unused)),

>        argc--;

>      }

>

> -  if (!argc)

> -    {

> -      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));

> -      goto fail;

> -    }

> -

>    if (!loaded)

>      {

>        grub_error (GRUB_ERR_BAD_ARGUMENT,

>

> _______________________________________________

> Grub-devel mailing list

> Grub-devel@gnu.org

> https://lists.gnu.org/mailman/listinfo/grub-devel

>
<br><br><div class="gmail_quote"><div dir="ltr">On Tue, 20 Nov 2018, 14:40 Lee Jones, &lt;<a href="mailto:lee.jones@linaro.org">lee.jones@linaro.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Lee Jones &lt;<a href="mailto:lee.jones@linaro.org" target="_blank">lee.jones@linaro.org</a>&gt;<br>
<br>
arm64/xen: Remove duplicate check for arguments<br></blockquote></div><div>It&#39;s not duplicate because of argc-- right before it</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Lee Jones &lt;<a href="mailto:lee.jones@linaro.org" target="_blank">lee.jones@linaro.org</a>&gt;<br>

<br>
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c<br>
index 1b1dd8c65..5af15c70d 100644<br>
--- a/grub-core/loader/arm64/xen_boot.c<br>
+++ b/grub-core/loader/arm64/xen_boot.c<br>
@@ -404,12 +404,6 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),<br>
       argc--;<br>
     }<br>
<br>
-  if (!argc)<br>
-    {<br>
-      grub_error (GRUB_ERR_BAD_ARGUMENT, N_(&quot;filename expected&quot;));<br>
-      goto fail;<br>
-    }<br>
-<br>
   if (!loaded)<br>
     {<br>
       grub_error (GRUB_ERR_BAD_ARGUMENT,<br>
<br>
_______________________________________________<br>
Grub-devel mailing list<br>
<a href="mailto:Grub-devel@gnu.org" target="_blank">Grub-devel@gnu.org</a><br>
<a href="https://lists.gnu.org/mailman/listinfo/grub-devel" rel="noreferrer" target="_blank">https://lists.gnu.org/mailman/listinfo/grub-devel</a><br>
</blockquote></div>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
diff mbox series

Patch

diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index 1b1dd8c65..5af15c70d 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -404,12 +404,6 @@  grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
       argc--;
     }
 
-  if (!argc)
-    {
-      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
-      goto fail;
-    }
-
   if (!loaded)
     {
       grub_error (GRUB_ERR_BAD_ARGUMENT,