Re: [RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-03 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Since 00f2cfbbec6 ("glib: bump min required glib library version to > 2.48") we can use g_auto/g_autoptr to have the compiler automatically > free an allocated variable when it goes out of scope, removing this > burden on the developers. > > Pe

Re: [RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-03 Thread lizhij...@fujitsu.com
On 03/06/2021 17.30, Philippe Mathieu-Daudé wrote: > On 6/3/21 3:34 AM, lizhij...@fujitsu.com wrote: >> >> On 03/06/2021 01.51, Philippe Mathieu-Daudé wrote: >>> Since 00f2cfbbec6 ("glib: bump min required glib library version to >>> 2.48") we can use g_auto/g_autoptr to have the compiler automat

Re: [RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-03 Thread Philippe Mathieu-Daudé
On 6/3/21 3:34 AM, lizhij...@fujitsu.com wrote: > > > On 03/06/2021 01.51, Philippe Mathieu-Daudé wrote: >> Since 00f2cfbbec6 ("glib: bump min required glib library version to >> 2.48") we can use g_auto/g_autoptr to have the compiler automatically >> free an allocated variable when it goes out o

Re: [RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-02 Thread lizhij...@fujitsu.com
On 03/06/2021 01.51, Philippe Mathieu-Daudé wrote: > Since 00f2cfbbec6 ("glib: bump min required glib library version to > 2.48") we can use g_auto/g_autoptr to have the compiler automatically > free an allocated variable when it goes out of scope, Glad to know this feature. However per its code

[RFC PATCH 2/2] migration/rdma: Enable use of g_autoptr with struct rdma_cm_event

2021-06-02 Thread Philippe Mathieu-Daudé
Since 00f2cfbbec6 ("glib: bump min required glib library version to 2.48") we can use g_auto/g_autoptr to have the compiler automatically free an allocated variable when it goes out of scope, removing this burden on the developers. Per rdma_cm(7) and rdma_ack_cm_event(3) man pages: "rdma_ack_cm