diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-01 20:13:28 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-04-01 20:13:28 +0000 |
commit | be40f3a33c5a04fb97e77885cfc4844b448ebf9f (patch) | |
tree | c35dddff18f8ba221a68bfa833fa66aa2f3124d9 /main/strings.c | |
parent | 729f22522558310b9a01413a1be8a35b4f3cb7f5 (diff) |
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
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; } |