]> xenbits.xensource.com Git - libvirt.git/commitdiff
wireshark: Fix dissector for quad types
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 7 Mar 2022 09:08:49 +0000 (10:08 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 7 Mar 2022 11:37:54 +0000 (12:37 +0100)
This uses the right type that is expected to make it work even on platforms
where gint64 != quad_t.

Due to indentation changes it is best to view this patch with -w.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/wireshark/src/packet-libvirt.c

index eeacbcdf0e14a621d2e3624a42e3aea5b0d7804b..ee20e3734d742f350b1a6c44760d05ae5e0ac49c 100644 (file)
@@ -74,17 +74,17 @@ static gint ett_libvirt_stream_hole = -1;
 
 VIR_WARNINGS_NO_UNUSED_FUNCTION
 
-XDR_PRIMITIVE_DISSECTOR(int,     gint32,  int)
-XDR_PRIMITIVE_DISSECTOR(u_int,   guint32, uint)
-XDR_PRIMITIVE_DISSECTOR(short,   gint16,  int)
-XDR_PRIMITIVE_DISSECTOR(u_short, guint16, uint)
-XDR_PRIMITIVE_DISSECTOR(char,    gchar,   int)
-XDR_PRIMITIVE_DISSECTOR(u_char,  guchar,  uint)
-XDR_PRIMITIVE_DISSECTOR(hyper,   gint64,  int64)
-XDR_PRIMITIVE_DISSECTOR(u_hyper, guint64, uint64)
-XDR_PRIMITIVE_DISSECTOR(float,   gfloat,  float)
-XDR_PRIMITIVE_DISSECTOR(double,  gdouble, double)
-XDR_PRIMITIVE_DISSECTOR(bool,    bool_t,  boolean)
+XDR_PRIMITIVE_DISSECTOR(int,     gint32,   int)
+XDR_PRIMITIVE_DISSECTOR(u_int,   guint32,  uint)
+XDR_PRIMITIVE_DISSECTOR(short,   gint16,   int)
+XDR_PRIMITIVE_DISSECTOR(u_short, guint16,  uint)
+XDR_PRIMITIVE_DISSECTOR(char,    gchar,    int)
+XDR_PRIMITIVE_DISSECTOR(u_char,  guchar,   uint)
+XDR_PRIMITIVE_DISSECTOR(hyper,   quad_t,   int64)
+XDR_PRIMITIVE_DISSECTOR(u_hyper, u_quad_t, uint64)
+XDR_PRIMITIVE_DISSECTOR(float,   gfloat,   float)
+XDR_PRIMITIVE_DISSECTOR(double,  gdouble,  double)
+XDR_PRIMITIVE_DISSECTOR(bool,    bool_t,   boolean)
 
 VIR_WARNINGS_RESET