aboutsummaryrefslogtreecommitdiffstats
path: root/main/strings.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-01 20:13:28 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-01 20:13:28 +0000
commit2dfad9bd0ef4e59fb56ae84e8616ac1e1a5002b1 (patch)
treec35dddff18f8ba221a68bfa833fa66aa2f3124d9 /main/strings.c
parent65ce74d65d1b85f1cd94963e86f241fb1b9c7ee3 (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: http://svn.digium.com/svn/asterisk/trunk@185912 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/strings.c')
-rw-r--r--main/strings.c5
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;
}