summaryrefslogtreecommitdiff
path: root/src/mesa/shader/nvfragparse.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-08-25 15:14:25 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-08-25 15:14:25 +0000
commit383c39e58e0ab888afac473526109b62ec0f8f6f (patch)
tree2e3f3f8ea3432b576934f8b2d8056468c3eee1c4 /src/mesa/shader/nvfragparse.c
parent9983a27cbe4f123f4e7fcce59c0d8b61b0f73924 (diff)
use _mesa_alloc_instructions()
Diffstat (limited to 'src/mesa/shader/nvfragparse.c')
-rw-r--r--src/mesa/shader/nvfragparse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index 13610417e9..49ce220944 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -1534,14 +1534,13 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget,
/* copy the compiled instructions */
assert(parseState.numInst <= MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS);
- newInst = (struct prog_instruction *)
- MALLOC(parseState.numInst * sizeof(struct prog_instruction));
+ newInst = _mesa_alloc_instructions(parseState.numInst);
if (!newInst) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return; /* out of memory */
}
- MEMCPY(newInst, instBuffer,
- parseState.numInst * sizeof(struct prog_instruction));
+ _mesa_memcpy(newInst, instBuffer,
+ parseState.numInst * sizeof(struct prog_instruction));
/* install the program */
program->Base.Target = target;