diff options
author | Vinson Lee <[email protected]> | 2009-12-10 18:51:51 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-10 18:51:51 -0800 |
commit | 94fba49be97008565c0225bc46894bfd9453bb5e (patch) | |
tree | d28bad52bb1b536bec58fede7e71ab573055410b /src/mesa | |
parent | e31df54754e2305b7cc7072053bf5a4e0b477fd6 (diff) |
mesa: Initialize variable in MatchInstruction.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/nvfragparse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 0fd55524abf..b739a6aa07c 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -217,6 +217,12 @@ MatchInstruction(const GLubyte *token) const struct instruction_pattern *inst; struct instruction_pattern result; + result.name = NULL; + result.opcode = MAX_OPCODE; /* i.e. invalid instruction */ + result.inputs = 0; + result.outputs = 0; + result.suffixes = 0; + for (inst = Instructions; inst->name; inst++) { if (_mesa_strncmp((const char *) token, inst->name, 3) == 0) { /* matched! */ @@ -247,7 +253,7 @@ MatchInstruction(const GLubyte *token) return result; } } - result.opcode = MAX_OPCODE; /* i.e. invalid instruction */ + return result; } |