projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9030506
)
ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.
author
Matt Turner
<mattst88@gmail.com>
Mon, 29 Jun 2015 22:05:19 +0000
(15:05 -0700)
committer
Matt Turner
<mattst88@gmail.com>
Thu, 12 Nov 2015 19:00:10 +0000
(11:00 -0800)
We were leaving it undefined, even though we were writing a string to
*str.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/util/ralloc.c
patch
|
blob
|
history
diff --git
a/src/util/ralloc.c
b/src/util/ralloc.c
index e07fce74f23d7b95c4f59961d7ddd420eec0602f..bb4cf9612eb3c28683dbae82eeefe643648a1b95 100644
(file)
--- a/
src/util/ralloc.c
+++ b/
src/util/ralloc.c
@@
-499,6
+499,7
@@
ralloc_vasprintf_rewrite_tail(char **str, size_t *start, const char *fmt,
if (unlikely(*str == NULL)) {
// Assuming a NULL context is probably bad, but it's expected behavior.
*str = ralloc_vasprintf(NULL, fmt, args);
+ *start = strlen(*str);
return true;
}