[V17,8/9] qemu-option: make qemu_opts_del accept opts being NULL

Submitted by Robert Wang on July 17, 2013, 9:29 a.m.

Details

Message ID 1374053388-17431-9-git-send-email-wdongxu@linux.vnet.ibm.com
State New
Headers show

Commit Message

Robert Wang July 17, 2013, 9:29 a.m.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
---
 util/qemu-option.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Robert Wang July 17, 2013, 9:50 a.m.
Please ignore patch 8 and patch9, it won't work and I will re-send
them seperately.
Sorry for the inconvenience.

On Wed, Jul 17, 2013 at 5:29 PM, Dong Xu Wang
<wdongxu@linux.vnet.ibm.com> wrote:
> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> ---
>  util/qemu-option.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 7545486..f4a0282 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -656,6 +656,10 @@ void qemu_opts_del(QemuOpts *opts)
>  {
>      QemuOpt *opt;
>
> +    if (!opts) {
> +        return;
> +    }
> +
>      for (;;) {
>          opt = QTAILQ_FIRST(&opts->head);
>          if (opt == NULL)
> --
> 1.7.11.7
>
Kevin Wolf July 17, 2013, 11:48 a.m.
Am 17.07.2013 um 11:50 hat Dong Xu Wang geschrieben:
> Please ignore patch 8 and patch9, it won't work and I will re-send
> them seperately.
> Sorry for the inconvenience.

Seriously? We're at v17 and you're still sending code that is broken
enough that you recall it after half an hour? How much and what kind of
testing did you give the series after you made the latest changes?

I'm not planning to review anything that is likely to be broken anyway
because you rushed things.

Kevin

Patch hide | download patch | download mbox

diff --git a/util/qemu-option.c b/util/qemu-option.c
index 7545486..f4a0282 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -656,6 +656,10 @@  void qemu_opts_del(QemuOpts *opts)
 {
     QemuOpt *opt;
 
+    if (!opts) {
+        return;
+    }
+
     for (;;) {
         opt = QTAILQ_FIRST(&opts->head);
         if (opt == NULL)