aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>2005-08-12 13:05:50 +0000
committervh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>2005-08-12 13:05:50 +0000
commite08e53f1512f23a00b95f68bff95667ffec86df4 (patch)
treeb13afffd2de1ee29a842f54bbe2196b6b302eab5
parent39b35eca80d4a11f4a82750189bdd9960cee8f66 (diff)
downloadxen-e08e53f1512f23a00b95f68bff95667ffec86df4.tar.gz
xen-e08e53f1512f23a00b95f68bff95667ffec86df4.tar.bz2
xen-e08e53f1512f23a00b95f68bff95667ffec86df4.zip
make needlessly global functions static and use NULL instead of 0 for pointer
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
-rw-r--r--tools/libxc/Makefile2
-rw-r--r--tools/libxc/xc_core.c2
-rw-r--r--tools/libxc/xc_linux_restore.c2
-rw-r--r--tools/libxc/xc_linux_save.c8
-rw-r--r--tools/libxc/xc_ptrace.c2
-rw-r--r--tools/libxc/xc_vmx_build.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 81fcdc2750..41b024d273 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -7,7 +7,7 @@ INSTALL_DIR = $(INSTALL) -d -m0755
MAJOR = 3.0
MINOR = 0
-CC = gcc
+CC = sparse
XEN_ROOT = ../..
include $(XEN_ROOT)/tools/Rules.mk
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index a5468023cf..df4352de1c 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -43,7 +43,7 @@ xc_domain_dumpcore(int xc_handle,
goto error_out;
}
- if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == 0) {
+ if ((dump_mem_start = malloc(DUMP_INCREMENT*PAGE_SIZE)) == NULL) {
PERROR("Could not allocate dump_mem");
goto error_out;
}
diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c
index c4375c372e..67d5607e77 100644
--- a/tools/libxc/xc_linux_restore.c
+++ b/tools/libxc/xc_linux_restore.c
@@ -32,7 +32,7 @@
#define PPRINTF(_f, _a...)
#endif
-ssize_t
+static ssize_t
read_exact(int fd, void *buf, size_t count)
{
int r = 0, s;
diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c
index a66ada565d..77349c88a3 100644
--- a/tools/libxc/xc_linux_save.c
+++ b/tools/libxc/xc_linux_save.c
@@ -136,7 +136,7 @@ static long long tv_to_us( struct timeval *new )
return (new->tv_sec * 1000000) + new->tv_usec;
}
-static long long llgettimeofday()
+static long long llgettimeofday( void )
{
struct timeval now;
gettimeofday(&now, NULL);
@@ -312,9 +312,9 @@ static int analysis_phase( int xc_handle, u32 domid,
}
-int suspend_and_state(int xc_handle, int io_fd, int dom,
- xc_dominfo_t *info,
- vcpu_guest_context_t *ctxt)
+static int suspend_and_state(int xc_handle, int io_fd, int dom,
+ xc_dominfo_t *info,
+ vcpu_guest_context_t *ctxt)
{
int i=0;
char ans[30];
diff --git a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c
index 2b53f460cf..fdeca60e2e 100644
--- a/tools/libxc/xc_ptrace.c
+++ b/tools/libxc/xc_ptrace.c
@@ -221,7 +221,7 @@ map_domain_va(unsigned long domid, int cpu, void * guest_va, int perm)
return (void *)(((unsigned long)page_virt[cpu]) | (va & BSD_PAGE_MASK));
error_out:
- return 0;
+ return NULL;
}
int
diff --git a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
index ecd1d39b52..f10cc8391c 100644
--- a/tools/libxc/xc_vmx_build.c
+++ b/tools/libxc/xc_vmx_build.c
@@ -624,7 +624,7 @@ static int setup_guest(int xc_handle,
#define VMX_FEATURE_FLAG 0x20
-int vmx_identify(void)
+static int vmx_identify(void)
{
int eax, ecx;