From a2aeb8461a435621330a692998237f259c356640 Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 5 Oct 2004 20:57:31 +0000 Subject: * src/actions.c (cmd_unsetenv): add an '=' to the string passed to putenv. --- src/sbuf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/sbuf.c') diff --git a/src/sbuf.c b/src/sbuf.c index c28eed8..52af83e 100644 --- a/src/sbuf.c +++ b/src/sbuf.c @@ -53,6 +53,21 @@ sbuf_free (struct sbuf *b) } } +/* Free the structure but return the string. */ +char * +sbuf_free_struct (struct sbuf *b) +{ + if (b != NULL) + { + char *tmp; + tmp = b->data; + free (b); + return tmp; + } + + return NULL; +} + char * sbuf_concat (struct sbuf *b, const char *str) { -- cgit v1.2.3