[asterisk-commits] ctooley: branch ctooley/excel-sip-changes r118357 - /team/ctooley/excel-sip-c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 27 10:26:46 CDT 2008


Author: ctooley
Date: Tue May 27 10:26:45 2008
New Revision: 118357

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118357
Log:
Replace usage of 'buf' with 'origbuf' in ast_str_length(), ast_str_capacity(), ast_str_to_string(), and ast_str_replace_char()

Modified:
    team/ctooley/excel-sip-changes/include/asterisk/strings.h

Modified: team/ctooley/excel-sip-changes/include/asterisk/strings.h
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/include/asterisk/strings.h?view=diff&rev=118357&r1=118356&r2=118357
==============================================================================
--- team/ctooley/excel-sip-changes/include/asterisk/strings.h (original)
+++ team/ctooley/excel-sip-changes/include/asterisk/strings.h Tue May 27 10:26:45 2008
@@ -686,7 +686,7 @@
 
 /*! \brief Replace a specific character with another character
  *
- * \arg buf This is the address pointer to a struct ast_str.
+ * \arg origbuf This is the address pointer to a struct ast_str.
  *
  * \arg replace The char to be matched within the string contained
  *              in the ast_str struct that is be replaced.
@@ -706,7 +706,7 @@
  * 	   work or 0 on success.
  */
 AST_INLINE_API(
-int ast_str_replace_char(struct ast_str *buf, const char replace, 
+int ast_str_replace_char(struct ast_str *origbuf, const char replace, 
 	const char *with, const int occurrences, const int end),
 {
 
@@ -716,11 +716,11 @@
 	int counter = 0;
 	struct ast_str *remove;
 
-	if(!buf || !replace) {
+	if(!origbuf || !replace) {
 		return -1;
 	}
 
-	str_buf = ast_strdupa(buf->str);
+	str_buf = ast_strdupa(origbuf->str);
 	if (!ast_strlen_zero(with)) {
 		if (!end) {
 			while((replace_ptr = strchr(str_buf, replace)) != NULL) {
@@ -741,15 +741,15 @@
 				}
 			}
 		}	
-		ast_str_set(&buf, 0, "%s", str_buf);
+		ast_str_set(&origbuf, 0, "%s", str_buf);
 		return 0;
 	} else {
 		while (str_buf) {
-			remove = ast_str_alloca(buf->len);
+			remove = ast_str_alloca(origbuf->len);
 			remove_buf = strsep(&str_buf, &replace);
 			ast_str_append(&remove, 0, "%s", remove_buf);
 		} 
-		ast_str_set(&buf, 0, "%s", remove->str);
+		ast_str_set(&origbuf, 0, "%s", remove->str);
 		return 0;
 	} 
 }
@@ -763,10 +763,10 @@
  * 	   contained by the struct.
  */
 AST_INLINE_API(
-char * ast_str_to_string(struct ast_str *buf),
-{
-	if (buf) {
-		return buf->str;
+char * ast_str_to_string(struct ast_str *origbuf),
+{
+	if (origbuf) {
+		return origbuf->str;
 	} else {
 		return NULL;
 	}
@@ -775,16 +775,16 @@
 
 /*! \brief Get the current maximum length of a dynamic string.
  *
- * \arg buf This is the address pointer to a struct ast_str
+ * \arg origbuf This is the address pointer to a struct ast_str
  *
  * \return The return value of this function is the current maximum
  * 	   length (capicity) of the string contained by the struct.
  */
 AST_INLINE_API(
-size_t ast_str_capacity(struct ast_str *buf),
-{
-	if (buf) {
-		return buf->len;
+size_t ast_str_capacity(struct ast_str *origbuf),
+{
+	if (origbuf) {
+		return origbuf->len;
 	} else {
 		return 0;
 	}
@@ -793,16 +793,16 @@
 
 /*! \brief Get the current length of a dynamic string.
  *
- * \arg buf This is the address pointer to a struct ast_str
+ * \arg origbuf This is the address pointer to a struct ast_str
  *
  * \return The return value of this function is the current length
  * 	   of the string contained by the struct.
  */
 AST_INLINE_API(
-size_t ast_str_length(struct ast_str *buf),
-{
-	if (buf) {
-		return buf->used;
+size_t ast_str_length(struct ast_str *origbuf),
+{
+	if (origbuf) {
+		return origbuf->used;
 	} else {
 		return 0;
 	}




More information about the asterisk-commits mailing list