]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetclient: Update comment about memset()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 09:48:57 +0000 (11:48 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 14:41:19 +0000 (16:41 +0200)
Instead of suggesting to zero structs out using memset() we
should suggest initializing structs with zero initializer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
src/rpc/virnetclient.c

index df2958935bc8174882f1fbbc08115fcd9ac9bd33..18f87653f50b7b33219bb62875f3bece2cf43530 100644 (file)
@@ -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
  *