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] [xen-unstable] tools: libxl: constify parameter to libxl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: libxl: constify parameter to libxl__abs_path
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:44 +0100
Delivery-date: Thu, 16 Jun 2011 03:15:43 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306257743 -3600
# Node ID 2b84aed6017584004cb7157792c9da15acb17000
# Parent  f5db59e0bbc8e65bf0b72f2f917f0d55b7595ed3
tools: libxl: constify parameter to libxl__abs_path

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r f5db59e0bbc8 -r 2b84aed60175 tools/libxl/libxl_internal.c
--- a/tools/libxl/libxl_internal.c      Tue May 24 18:21:45 2011 +0100
+++ b/tools/libxl/libxl_internal.c      Tue May 24 18:22:23 2011 +0100
@@ -184,10 +184,10 @@
     va_end(ap);
 }
 
-char *libxl__abs_path(libxl__gc *gc, char *s, const char *path)
+char *libxl__abs_path(libxl__gc *gc, const char *s, const char *path)
 {
     if (!s || s[0] == '/')
-        return s;
+        return libxl__strdup(gc, s);
     return libxl__sprintf(gc, "%s/%s", path, s);
 }
 
diff -r f5db59e0bbc8 -r 2b84aed60175 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Tue May 24 18:21:45 2011 +0100
+++ b/tools/libxl/libxl_internal.h      Tue May 24 18:22:23 2011 +0100
@@ -309,7 +309,7 @@
 _hidden void libxl__log_child_exitstatus(libxl__gc *gc,
                                 const char *what, pid_t pid, int status);
 
-_hidden char *libxl__abs_path(libxl__gc *gc, char *s, const char *path);
+_hidden char *libxl__abs_path(libxl__gc *gc, const char *s, const char *path);
 
 #define LIBXL__LOG_DEBUG   XTL_DEBUG
 #define LIBXL__LOG_INFO    XTL_INFO

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: libxl: constify parameter to libxl__abs_path, Xen patchbot-unstable <=