From 50f34a622edc4d737d671622401f7dad44a10d62 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 3 Jun 2008 13:51:57 +0300 Subject: [PATCH] Rip doputenv() for good --- lib/misc.c | 9 --------- lib/misc.h | 7 ------- 2 files changed, 16 deletions(-) diff --git a/lib/misc.c b/lib/misc.c index d8e9679..841d48a 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -34,13 +34,4 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname) return RPMRC_OK; } -int doputenv(const char *str) -{ - char * a; - - /* FIXME: this leaks memory! */ - a = xmalloc(strlen(str) + 1); - strcpy(a, str); - return putenv(a); -} diff --git a/lib/misc.h b/lib/misc.h index 574c468..4029d98 100644 --- a/lib/misc.h +++ b/lib/misc.h @@ -22,13 +22,6 @@ extern "C" { */ rpmRC rpmMkdirPath (const char * dpath, const char * dname); -/** - * Like the libc function, but malloc()'s the space needed. - * @param str "name=value" string - * @return 0 on success - */ -int doputenv(const char * str); - #ifdef __cplusplus } #endif -- 2.7.4