From: Michal Privoznik Date: Thu, 3 Aug 2023 09:48:57 +0000 (+0200) Subject: virnetclient: Update comment about memset() X-Git-Tag: v9.7.0-rc1~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b95df9edaf5c1ab0aaa30727729f7fcc9122ddb;p=thirdparty%2Flibvirt.git virnetclient: Update comment about memset() Instead of suggesting to zero structs out using memset() we should suggest initializing structs with zero initializer. Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana --- diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index df2958935b..18f87653f5 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1857,8 +1857,8 @@ static void virNetClientIOUpdateCallback(virNetClient *client, * which come from the user). It does however free any intermediate * results, eg. the error structure if there is one. * - * NB(2). Make sure to memset (&ret, 0, sizeof(ret)) before calling, - * else Bad Things will happen in the XDR code. + * NB(2). Make sure to initialize ret variable to { 0 } before calling, + * else Bad things will happen in the XDR code. * * NB(3) You must have the client lock before calling this *