Patchwork [1/5] boards: qemu_register_machine(): return void

login
register
mail settings
Submitter Luiz Capitulino
Date Feb. 24, 2012, 2:13 p.m.
Message ID <1330092792-22455-2-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/142846/
State New
Headers show

Comments

Luiz Capitulino - Feb. 24, 2012, 2:13 p.m.
It never fails.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/boards.h |    2 +-
 vl.c        |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Andreas Färber - Feb. 24, 2012, 2:17 p.m.
Am 24.02.2012 15:13, schrieb Luiz Capitulino:
> It never fails.

...and is never checked. Low-impact cleanup, thanks.

> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

> ---
>  hw/boards.h |    2 +-
>  vl.c        |    3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/boards.h b/hw/boards.h
> index 667177d..7a9899f 100644
> --- a/hw/boards.h
> +++ b/hw/boards.h
> @@ -31,7 +31,7 @@ typedef struct QEMUMachine {
>      struct QEMUMachine *next;
>  } QEMUMachine;
>  
> -int qemu_register_machine(QEMUMachine *m);
> +void qemu_register_machine(QEMUMachine *m);
>  QEMUMachine *find_default_machine(void);
>  
>  extern QEMUMachine *current_machine;
> diff --git a/vl.c b/vl.c
> index 7a8cc08..45fc3b5 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1163,7 +1163,7 @@ void pcmcia_info(Monitor *mon)
>  static QEMUMachine *first_machine = NULL;
>  QEMUMachine *current_machine = NULL;
>  
> -int qemu_register_machine(QEMUMachine *m)
> +void qemu_register_machine(QEMUMachine *m)
>  {
>      QEMUMachine **pm;
>      pm = &first_machine;
> @@ -1171,7 +1171,6 @@ int qemu_register_machine(QEMUMachine *m)
>          pm = &(*pm)->next;
>      m->next = NULL;
>      *pm = m;
> -    return 0;
>  }
>  
>  static QEMUMachine *find_machine(const char *name)

Patch

diff --git a/hw/boards.h b/hw/boards.h
index 667177d..7a9899f 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -31,7 +31,7 @@  typedef struct QEMUMachine {
     struct QEMUMachine *next;
 } QEMUMachine;
 
-int qemu_register_machine(QEMUMachine *m);
+void qemu_register_machine(QEMUMachine *m);
 QEMUMachine *find_default_machine(void);
 
 extern QEMUMachine *current_machine;
diff --git a/vl.c b/vl.c
index 7a8cc08..45fc3b5 100644
--- a/vl.c
+++ b/vl.c
@@ -1163,7 +1163,7 @@  void pcmcia_info(Monitor *mon)
 static QEMUMachine *first_machine = NULL;
 QEMUMachine *current_machine = NULL;
 
-int qemu_register_machine(QEMUMachine *m)
+void qemu_register_machine(QEMUMachine *m)
 {
     QEMUMachine **pm;
     pm = &first_machine;
@@ -1171,7 +1171,6 @@  int qemu_register_machine(QEMUMachine *m)
         pm = &(*pm)->next;
     m->next = NULL;
     *pm = m;
-    return 0;
 }
 
 static QEMUMachine *find_machine(const char *name)