diff mbox series

[1/8] qobject: Catch another straggler for use of qdict_put_str()

Message ID 20180704153919.12432-2-f4bug@amsat.org
State New
Headers show
Series Coccinelle cleanups | expand

Commit Message

Philippe Mathieu-Daudé July 4, 2018, 3:39 p.m. UTC
Patch created mechanically by rerunning:

  $  spatch --sp-file scripts/coccinelle/qobject.cocci \
            --macro-file scripts/cocci-macro-file.h \
            --dir . --in-place

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 qobject/block-qdict.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster July 5, 2018, 5:38 a.m. UTC | #1
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Patch created mechanically by rerunning:
>
>   $  spatch --sp-file scripts/coccinelle/qobject.cocci \
>             --macro-file scripts/cocci-macro-file.h \
>             --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  qobject/block-qdict.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
> index 80c653013f..ae363708ab 100644
> --- a/qobject/block-qdict.c
> +++ b/qobject/block-qdict.c
> @@ -572,7 +572,7 @@ static QObject *qdict_crumple_for_keyval_qiv(QDict *src, Error **errp)
>          if (!tmp) {
>              tmp = qdict_clone_shallow(src);
>          }
> -        qdict_put(tmp, ent->key, qstring_from_str(s));
> +        qdict_put_str(tmp, ent->key, s);
>          g_free(buf);
>      }

Reviewed-by: Markus Armbruster <armbru@redhat.com>
diff mbox series

Patch

diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
index 80c653013f..ae363708ab 100644
--- a/qobject/block-qdict.c
+++ b/qobject/block-qdict.c
@@ -572,7 +572,7 @@  static QObject *qdict_crumple_for_keyval_qiv(QDict *src, Error **errp)
         if (!tmp) {
             tmp = qdict_clone_shallow(src);
         }
-        qdict_put(tmp, ent->key, qstring_from_str(s));
+        qdict_put_str(tmp, ent->key, s);
         g_free(buf);
     }