ia64/xen-unstable

changeset 6138:1fb1877ed6d1

make needlessly global functions static and use NULL instead of 0 for pointer

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Fri Aug 12 13:05:50 2005 +0000 (2005-08-12)
parents c813cb64d82e
children 38bee85ddeb8 46cf22571980
files tools/libxc/Makefile tools/libxc/xc_core.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c
line diff
     1.1 --- a/tools/libxc/Makefile	Fri Aug 12 10:51:39 2005 +0000
     1.2 +++ b/tools/libxc/Makefile	Fri Aug 12 13:05:50 2005 +0000
     1.3 @@ -7,7 +7,7 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
     1.4  MAJOR    = 3.0
     1.5  MINOR    = 0
     1.6  
     1.7 -CC       = gcc
     1.8 +CC       = sparse
     1.9  
    1.10  XEN_ROOT = ../..
    1.11  include $(XEN_ROOT)/tools/Rules.mk
     2.1 --- a/tools/libxc/xc_core.c	Fri Aug 12 10:51:39 2005 +0000
     2.2 +++ b/tools/libxc/xc_core.c	Fri Aug 12 13:05:50 2005 +0000
     2.3 @@ -43,7 +43,7 @@ xc_domain_dumpcore(int xc_handle,
     2.4  		goto error_out;
     2.5  	}
     2.6  	
     2.7 -	if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == 0) {
     2.8 +	if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == NULL) {
     2.9  		PERROR("Could not allocate dump_mem");
    2.10  		goto error_out;
    2.11  	}
     3.1 --- a/tools/libxc/xc_linux_restore.c	Fri Aug 12 10:51:39 2005 +0000
     3.2 +++ b/tools/libxc/xc_linux_restore.c	Fri Aug 12 13:05:50 2005 +0000
     3.3 @@ -32,7 +32,7 @@
     3.4  #define PPRINTF(_f, _a...)
     3.5  #endif
     3.6  
     3.7 -ssize_t
     3.8 +static ssize_t
     3.9  read_exact(int fd, void *buf, size_t count)
    3.10  {
    3.11      int r = 0, s;
     4.1 --- a/tools/libxc/xc_linux_save.c	Fri Aug 12 10:51:39 2005 +0000
     4.2 +++ b/tools/libxc/xc_linux_save.c	Fri Aug 12 13:05:50 2005 +0000
     4.3 @@ -136,7 +136,7 @@ static long long tv_to_us( struct timeva
     4.4      return (new->tv_sec * 1000000) + new->tv_usec;
     4.5  }
     4.6  
     4.7 -static long long llgettimeofday()
     4.8 +static long long llgettimeofday( void )
     4.9  {
    4.10      struct timeval now;
    4.11      gettimeofday(&now, NULL);
    4.12 @@ -312,9 +312,9 @@ static int analysis_phase( int xc_handle
    4.13  }
    4.14  
    4.15  
    4.16 -int suspend_and_state(int xc_handle, int io_fd,	int dom,	      
    4.17 -                      xc_dominfo_t *info,
    4.18 -                      vcpu_guest_context_t *ctxt)
    4.19 +static int suspend_and_state(int xc_handle, int io_fd,	int dom,	      
    4.20 +                             xc_dominfo_t *info,
    4.21 +                             vcpu_guest_context_t *ctxt)
    4.22  {
    4.23      int i=0;
    4.24      char ans[30];
     5.1 --- a/tools/libxc/xc_ptrace.c	Fri Aug 12 10:51:39 2005 +0000
     5.2 +++ b/tools/libxc/xc_ptrace.c	Fri Aug 12 13:05:50 2005 +0000
     5.3 @@ -221,7 +221,7 @@ map_domain_va(unsigned long domid, int c
     5.4      return (void *)(((unsigned long)page_virt[cpu]) | (va & BSD_PAGE_MASK));
     5.5  
     5.6   error_out:
     5.7 -    return 0;
     5.8 +    return NULL;
     5.9  }
    5.10  
    5.11  int 
     6.1 --- a/tools/libxc/xc_vmx_build.c	Fri Aug 12 10:51:39 2005 +0000
     6.2 +++ b/tools/libxc/xc_vmx_build.c	Fri Aug 12 13:05:50 2005 +0000
     6.3 @@ -624,7 +624,7 @@ static int setup_guest(int xc_handle,
     6.4  
     6.5  #define VMX_FEATURE_FLAG 0x20
     6.6  
     6.7 -int vmx_identify(void)
     6.8 +static int vmx_identify(void)
     6.9  {
    6.10      int eax, ecx;
    6.11