qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Clean up assertion in get_boot_devices_list()
@ 2011-11-08  9:58 Markus Armbruster
  2011-11-09 19:44 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Armbruster @ 2011-11-08  9:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: gleb

g_strdup() can't fail, remove assertion.  Assert its argument can't be
null, because that's not obvious (add_boot_device_path() ensures it).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index 641629b..f169aac 100644
--- a/vl.c
+++ b/vl.c
@@ -915,8 +915,8 @@ char *get_boot_devices_list(uint32_t *size)
         } else if (devpath) {
             bootpath = devpath;
         } else {
+            assert(i->suffix);
             bootpath = g_strdup(i->suffix);
-            assert(bootpath);
         }
 
         if (total) {
-- 
1.7.6.4

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

* Re: [Qemu-devel] [PATCH] Clean up assertion in get_boot_devices_list()
  2011-11-08  9:58 [Qemu-devel] [PATCH] Clean up assertion in get_boot_devices_list() Markus Armbruster
@ 2011-11-09 19:44 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2011-11-09 19:44 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, gleb

On 11/08/2011 03:58 AM, Markus Armbruster wrote:
> g_strdup() can't fail, remove assertion.  Assert its argument can't be
> null, because that's not obvious (add_boot_device_path() ensures it).
>
> Signed-off-by: Markus Armbruster<armbru@redhat.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   vl.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 641629b..f169aac 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -915,8 +915,8 @@ char *get_boot_devices_list(uint32_t *size)
>           } else if (devpath) {
>               bootpath = devpath;
>           } else {
> +            assert(i->suffix);
>               bootpath = g_strdup(i->suffix);
> -            assert(bootpath);
>           }
>
>           if (total) {

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

end of thread, other threads:[~2011-11-09 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08  9:58 [Qemu-devel] [PATCH] Clean up assertion in get_boot_devices_list() Markus Armbruster
2011-11-09 19:44 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).