Merge changes from str_substitution that are unrelated to that branch.

Included is a small bugfix to an ast_str helper, but most of these changes
are simply doxygen fixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-04-01 20:13:28 +00:00
parent 729f225225
commit be40f3a33c
11 changed files with 112 additions and 77 deletions

View File

@@ -66,7 +66,7 @@ int __ast_str_helper(struct ast_str **buf, size_t max_len,
}
/*
* Ask vsnprintf how much space we need. Remember that vsnprintf
* does not count the final '\0' so we must add 1.
* does not count the final <code>'\0'</code> so we must add 1.
*/
va_copy(aq, ap);
res = vsnprintf((*buf)->__AST_STR_STR + offset, (*buf)->__AST_STR_LEN - offset, fmt, aq);
@@ -156,11 +156,10 @@ char *__ast_str_helper2(struct ast_str **buf, size_t maxlen, const char *src, si
ptr += (*buf)->__AST_STR_STR - oldbase;
}
}
if (__builtin_expect(!(maxsrc && maxlen), 0)) {
if (__builtin_expect(!maxlen, 0)) {
ptr--;
}
*ptr = '\0';
(*buf)->__AST_STR_USED--;
return (*buf)->__AST_STR_STR;
}