Re: [PATCH] block: Refactor get_tmp_filename()

2022-09-26 Thread Daniel P . Berrangé
On Sat, Sep 24, 2022 at 04:00:34PM +0800, Bin Meng wrote: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename =

[PATCH] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);