[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 07/25] block: bdrv_get_full_backing_filename'
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v3 07/25] block: bdrv_get_full_backing_filename's ret. val. |
Date: |
Thu, 15 Dec 2016 17:39:30 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 30 Nov 2016 02:18:33 AM CET, Max Reitz wrote:
> int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
> const char *bdref_key, Error **errp)
> {
> - char *backing_filename = g_malloc0(PATH_MAX);
> + char *backing_filename = NULL;
> char *bdref_key_dot;
> const char *reference = NULL;
> int ret = 0;
> @@ -1511,7 +1505,7 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict
> *parent_options,
>
> reference = qdict_get_try_str(parent_options, bdref_key);
> if (reference || qdict_haskey(options, "file.filename")) {
> - backing_filename[0] = '\0';
> + backing_filename = NULL;
You're making it NULL, but it's NULL already.
Otherwise the patch looks fine.
Berto
- Re: [Qemu-block] [PATCH v3 07/25] block: bdrv_get_full_backing_filename's ret. val.,
Alberto Garcia <=