ia64/xen-unstable

changeset 9778:123ff1c70728

Fix swapped calloc() arguments.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Apr 19 18:39:36 2006 +0100 (2006-04-19)
parents 5765497cf75e
children b0ee5d9b9ebd
files tools/ioemu/keyboard_rdesktop.c tools/libxc/xc_linux_restore.c
line diff
     1.1 --- a/tools/ioemu/keyboard_rdesktop.c	Wed Apr 19 18:38:14 2006 +0100
     1.2 +++ b/tools/ioemu/keyboard_rdesktop.c	Wed Apr 19 18:39:36 2006 +0100
     1.3 @@ -75,7 +75,7 @@ static kbd_layout_t* parse_keyboard_layo
     1.4      char* file_name=malloc(strlen(prefix)+strlen(language)+strlen(bios_dir)+1);
     1.5  
     1.6  	if(!k)
     1.7 -		k=calloc(sizeof(kbd_layout_t),1);
     1.8 +		k=calloc(1, sizeof(kbd_layout_t));
     1.9  	strcpy(file_name,bios_dir);
    1.10  	strcat(file_name,prefix);
    1.11  	strcat(file_name,language);
     2.1 --- a/tools/libxc/xc_linux_restore.c	Wed Apr 19 18:38:14 2006 +0100
     2.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Apr 19 18:39:36 2006 +0100
     2.3 @@ -183,9 +183,9 @@ int xc_linux_restore(int xc_handle, int 
     2.4  
     2.5  
     2.6      /* We want zeroed memory so use calloc rather than malloc. */
     2.7 -    p2m        = calloc(sizeof(unsigned long), max_pfn);
     2.8 -    pfn_type   = calloc(sizeof(unsigned long), max_pfn);
     2.9 -    region_mfn = calloc(sizeof(unsigned long), MAX_BATCH_SIZE);
    2.10 +    p2m        = calloc(max_pfn, sizeof(unsigned long));
    2.11 +    pfn_type   = calloc(max_pfn, sizeof(unsigned long));
    2.12 +    region_mfn = calloc(MAX_BATCH_SIZE, sizeof(unsigned long));
    2.13  
    2.14      if ((p2m == NULL) || (pfn_type == NULL) || (region_mfn == NULL)) {
    2.15          ERR("memory alloc failed");