]> xenbits.xensource.com Git - xen.git/commitdiff
[ACM] Explicitly cast byte arrays when used in copy_from_guest
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Aug 2007 08:04:44 +0000 (09:04 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Aug 2007 08:04:44 +0000 (09:04 +0100)
Explicitly cast the target array type to an array of 'u8' since the
number of bytes copied is calculated from the type of element in the
target array times the number of elements (3rd parameter).

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
xen/acm/acm_policy.c

index 5fd57e872bc3986e6e26219d9d0def89d2e174d0..23c5bbc79c9abdb94c77b080627cfb7760238e17 100644 (file)
@@ -710,10 +710,10 @@ acm_change_policy(struct acm_change_policy *chgpolicy)
         goto acm_chg_policy_exit;
     }
 
-    if ( copy_from_guest(dels.array,
+    if ( copy_from_guest((u8 *)dels.array,
                          chgpolicy->del_array,
                          chgpolicy->delarray_size) ||
-         copy_from_guest(ssidmap.array,
+         copy_from_guest((u8 *)ssidmap.array,
                          chgpolicy->chg_array,
                          chgpolicy->chgarray_size) ||
          copy_from_guest(binpolicy,
@@ -844,7 +844,7 @@ acm_relabel_domains(struct acm_relabel_doms *relabel)
         memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items);
     }
 
-    if ( copy_from_guest(relabels.array,
+    if ( copy_from_guest((u8 *)relabels.array,
                          relabel->relabel_map,
                          relabel->relabel_map_size) )
     {