diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-01 22:44:34 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-01 22:44:34 +0000 |
commit | 85a2885d4d8b0682d75f63ec7642c91509bc92bc (patch) | |
tree | 54be8ef17eee6eca550e1c721f215084edc0c53e /main/strings.c | |
parent | 499ccb7760af9f6c38d1729d0580faaa1f0252ca (diff) |
Merged revisions 185912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r185912 | tilghman | 2009-04-01 15:13:28 -0500 (Wed, 01 Apr 2009) | 4 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.2@185947 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/strings.c')
-rw-r--r-- | main/strings.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/strings.c b/main/strings.c index 88c240ff5..aecf4099e 100644 --- a/main/strings.c +++ b/main/strings.c @@ -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; } |