projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ca3b14
)
glsl: Fix invalid use of ralloc_asprintf in prototype_string.
author
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 2 Feb 2011 07:31:35 +0000
(23:31 -0800)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 2 Feb 2011 07:31:35 +0000
(23:31 -0800)
This was my mistake when converting from talloc to ralloc. I was
confused because the other calls in the function are to asprintf_append
and the original code used str as the context rather than NULL.
Fixes bug #33823.
src/glsl/ast_function.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ast_function.cpp
b/src/glsl/ast_function.cpp
index 28d49ee0daeb25a946f7a057b439aeaf805ef851..7611617df7e74a3b6af900a6c57f88bf3c8a4ee0 100644
(file)
--- a/
src/glsl/ast_function.cpp
+++ b/
src/glsl/ast_function.cpp
@@
-75,7
+75,7
@@
prototype_string(const glsl_type *return_type, const char *name,
char *str = NULL;
if (return_type != NULL)
-
ralloc_asprintf(&str
, "%s ", return_type->name);
+
str = ralloc_asprintf(NULL
, "%s ", return_type->name);
ralloc_asprintf_append(&str, "%s(", name);