diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 15:44:59 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 15:44:59 +0000 |
commit | b6d1722c83121906faa4328b34099dc90863591c (patch) | |
tree | 161d4101c449b6b2cb93c2c860f866655d25d056 | |
parent | 7db228ac9526387d318b9de293693f75dd9a8397 (diff) |
remove ast_safe_string_alloc() - it is completely
equivalent to asprintf().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | include/asterisk/channel.h | 6 | ||||
-rw-r--r-- | main/channel.c | 15 |
2 files changed, 0 insertions, 21 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 88ba77dbc..87f5efea8 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1143,12 +1143,6 @@ void ast_deactivate_generator(struct ast_channel *chan); void ast_set_callerid(struct ast_channel *chan, const char *cidnum, const char *cidname, const char *ani); - -/*! return a mallocd string with the result of sprintf of the fmt and following args */ -char *ast_safe_string_alloc(const char *fmt, ...); - - - /*! Start a tone going */ int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol); /*! Stop a tone from playing */ diff --git a/main/channel.c b/main/channel.c index 07d099c6a..75db6d28f 100644 --- a/main/channel.c +++ b/main/channel.c @@ -331,21 +331,6 @@ static int ast_check_hangup_locked(struct ast_channel *chan) return res; } -/*! \brief printf the string into a correctly sized mallocd buffer, and return the buffer */ -char *ast_safe_string_alloc(const char *fmt, ...) -{ - char *b2,buf[1]; - int len; - - va_list args; - va_start(args, fmt); - len = vsnprintf(buf, 1, fmt, args); - b2 = ast_malloc(len+1); - vsnprintf(b2, len+1, fmt, args); - va_end(args); - return b2; -} - /*! \brief Initiate system shutdown */ void ast_begin_shutdown(int hangup) { |