From dce66192f2f01817b3027c8c61c770abbfffd131 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Sat, 15 Dec 2007 09:39:32 +0200 Subject: [PATCH] Remove bogus const from rpmGenPath and rpmGetPath return type - both return malloced strings you're supposed to free --- rpmio/rpmfileutil.c | 5 ++--- rpmio/rpmfileutil.h | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index b3323db..e3b57e7 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -510,7 +510,7 @@ char *rpmCleanPath(char * path) /* Merge 3 args into path, any or all of which may be a url. */ -const char * rpmGenPath(const char * urlroot, const char * urlmdir, +char * rpmGenPath(const char * urlroot, const char * urlmdir, const char *urlfile) { const char * xroot = rpmGetPath(urlroot, NULL); @@ -561,8 +561,7 @@ const char * file = xfile; /* Return concatenated and expanded canonical path. */ -const char * -rpmGetPath(const char *path, ...) +char * rpmGetPath(const char *path, ...) { char buf[BUFSIZ]; const char * s; diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h index 0fd6814..56d4116 100644 --- a/rpmio/rpmfileutil.h +++ b/rpmio/rpmfileutil.h @@ -83,8 +83,7 @@ char * rpmCleanPath (char * path); * @param urlfile file URL (often a file, or NULL) * @return expanded, merged, canonicalized path (malloc'ed) */ -/* LCL: shrug */ -const char * rpmGenPath (const char * urlroot, +char * rpmGenPath (const char * urlroot, const char * urlmdir, const char * urlfile); @@ -93,8 +92,7 @@ const char * rpmGenPath (const char * urlroot, * @param path macro(s) to expand (NULL terminates list) * @return canonicalized path (malloc'ed) */ -/* LCL: shrug */ -const char * rpmGetPath (const char * path, ...); +char * rpmGetPath (const char * path, ...); /** \ingroup rpmfileutil * Return URL path(s) from a (URL prefixed) pattern glob. -- 2.7.4