|
From: | Jason Wang |
Subject: | Re: [Qemu-devel] [PATCH v4 3/3] net: tap: replace snprintf with g_strdup_printf calls |
Date: | Wed, 31 Jul 2019 12:58:22 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 2019/7/29 下午11:04, Stefan Hajnoczi wrote:
On Wed, Jul 24, 2019 at 11:18:09AM +0530, P J P wrote:+-- On Tue, 23 Jul 2019, Li Qiang wrote --+ | Stefan Hajnoczi <address@hidden> 于2019年7月23日周二 下午9:03写道: | > On Tue, Jul 23, 2019 at 04:17:54PM +0530, P J P wrote: | > > - snprintf(helper_cmd, sizeof(helper_cmd), "%s %s %s %s", | > > - helper, "--use-vnet", fd_buf, br_buf); | > > + helper_cmd = g_strdup_printf("%s %s %s %s", helper, | > > + "--use-vnet", fd_buf, br_buf ? br_buf : ""); | > | > The change to the br_buf argument isn't covered in the commit | > description. Why did you change this, was it a bug, etc? | | IIUC, if we pass the NULL argument in g_strdup_printf, the 'helper_cmd' will | contain the '(null)' char. Yep, right.This change isn't related to the topic of the patch. It's a separate bug fix. Please either document it in the commit description so it's clear the change is intentional, or send it as a separate patch. Stefan
Prasad, please send a patch for this. Thanks
[Prev in Thread] | Current Thread | [Next in Thread] |