WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] make needlessly global functions static and use NULL ins

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] make needlessly global functions static and use NULL instead of 0 for pointer
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Aug 2005 09:28:11 -0400
Delivery-date: Fri, 12 Aug 2005 13:28:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vh249@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 1fb1877ed6d1b2ae5b130e4d3e29fc06ef58db3c
# Parent  c813cb64d82ea97870416d2d0cdd6c3992a2c2b1
make needlessly global functions static and use NULL instead of 0 for pointer

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/Makefile      Fri Aug 12 13:05:50 2005
@@ -7,7 +7,7 @@
 MAJOR    = 3.0
 MINOR    = 0
 
-CC       = gcc
+CC       = sparse
 
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
diff -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/xc_core.c     Fri Aug 12 13:05:50 2005
@@ -43,7 +43,7 @@
                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 -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/xc_linux_restore.c    Fri Aug 12 13:05:50 2005
@@ -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 -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/xc_linux_save.c       Fri Aug 12 13:05:50 2005
@@ -136,7 +136,7 @@
     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 @@
 }
 
 
-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 -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/xc_ptrace.c   Fri Aug 12 13:05:50 2005
@@ -221,7 +221,7 @@
     return (void *)(((unsigned long)page_virt[cpu]) | (va & BSD_PAGE_MASK));
 
  error_out:
-    return 0;
+    return NULL;
 }
 
 int 
diff -r c813cb64d82e -r 1fb1877ed6d1 tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        Fri Aug 12 10:51:39 2005
+++ b/tools/libxc/xc_vmx_build.c        Fri Aug 12 13:05:50 2005
@@ -624,7 +624,7 @@
 
 #define VMX_FEATURE_FLAG 0x20
 
-int vmx_identify(void)
+static int vmx_identify(void)
 {
     int eax, ecx;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] make needlessly global functions static and use NULL instead of 0 for pointer, Xen patchbot -unstable <=