]> xenbits.xensource.com Git - xen.git/commitdiff
kdd: fix build again
authorWei Liu <wl@xen.org>
Fri, 3 Jul 2020 20:10:01 +0000 (20:10 +0000)
committerIan Jackson <iwj@xenproject.org>
Mon, 9 Nov 2020 17:58:19 +0000 (17:58 +0000)
Restore Tim's patch. The one that was committed was recreated by me
because git didn't accept my saved copy. I made some mistakes while
recreating that patch and here we are.

Fixes: 3471cafbdda3 ("kdd: stop using [0] arrays to access packet contents")
Reported-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Wei Liu <wl@xen.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
(cherry picked from commit d44cbbe0f3243afcc56e47dcfa97bbfe23e46fbb)

tools/debugger/kdd/kdd.c

index 87f18559bf05c8599f2c726cc0a83950bd19616a..30eb4408a76bad4b4dfa4c9ca6b93220a00b26b0 100644 (file)
@@ -67,11 +67,11 @@ typedef struct {
 /* State of the debugger stub */
 typedef struct {
     union {
-        uint8_t txb[sizeof (kdd_hdr)];           /* Marshalling area for tx */
+        uint8_t txb[sizeof (kdd_pkt)];           /* Marshalling area for tx */
         kdd_pkt txp;                 /* Also readable as a packet structure */
     };
     union {
-        uint8_t rxb[sizeof (kdd_hdr)];           /* Marshalling area for rx */
+        uint8_t rxb[sizeof (kdd_pkt)];           /* Marshalling area for rx */
         kdd_pkt rxp;                 /* Also readable as a packet structure */
     };
     unsigned int cur;       /* Offset into rx where we'll put the next byte */