All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 1/2] clean unnecessary code: don't check g_strdup arg for NULL
@ 2013-05-09  7:53 ` Dong Xu Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Dong Xu Wang @ 2013-05-09  7:53 UTC (permalink / raw)
  To: qemu-trivial; +Cc: hutao, qemu-devel

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
---
 util/uri.c | 2 +-
 vl.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/uri.c b/util/uri.c
index 4238729..e348c17 100644
--- a/util/uri.c
+++ b/util/uri.c
@@ -2162,7 +2162,7 @@ query_params_append (struct QueryParams *ps,
     }
 
     ps->p[ps->n].name = g_strdup(name);
-    ps->p[ps->n].value = value ? g_strdup(value) : NULL;
+    ps->p[ps->n].value = g_strdup(value);
     ps->p[ps->n].ignore = 0;
     ps->n++;
 
diff --git a/vl.c b/vl.c
index 6e6225f..be0a93c 100644
--- a/vl.c
+++ b/vl.c
@@ -1215,7 +1215,7 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,
 
     node = g_malloc0(sizeof(FWBootEntry));
     node->bootindex = bootindex;
-    node->suffix = suffix ? g_strdup(suffix) : NULL;
+    node->suffix = g_strdup(suffix);
     node->dev = dev;
 
     QTAILQ_FOREACH(i, &fw_boot_order, link) {
-- 
1.7.11.7



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-09  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09  7:53 [Qemu-trivial] [PATCH 1/2] clean unnecessary code: don't check g_strdup arg for NULL Dong Xu Wang
2013-05-09  7:53 ` [Qemu-devel] " Dong Xu Wang
2013-05-09  7:53 ` [Qemu-trivial] [PATCH 2/2] remove double semicolons Dong Xu Wang
2013-05-09  7:53   ` [Qemu-devel] " Dong Xu Wang
2013-05-09  8:23 ` [Qemu-trivial] [PATCH 1/2] clean unnecessary code: don't check g_strdup arg for NULL Michael Tokarev
2013-05-09  8:23   ` [Qemu-devel] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.