aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-08 23:27:52 +0200
committermarha <marha@users.sourceforge.net>2014-09-08 23:27:52 +0200
commitcb346e228aeb500cd61ec86644c034c238332d3b (patch)
tree5902a043a3643391e689ebb146e6fd02af1c4b8e /mesalib/src/mesa/program
parent4aef26e36bc9aba4cd67c158e17f5fb93c9e018c (diff)
downloadvcxsrv-cb346e228aeb500cd61ec86644c034c238332d3b.tar.gz
vcxsrv-cb346e228aeb500cd61ec86644c034c238332d3b.tar.bz2
vcxsrv-cb346e228aeb500cd61ec86644c034c238332d3b.zip
xkeyboard-config mesa git update 8 Sep 2014
xkeyboard-config commit 1b9901151cdb22e413319e6fca80fbbfc5e51502 mesa commit 12fb74fe895fe9954df127ca0ec6e4422fffb156
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r--mesalib/src/mesa/program/prog_instruction.c2
-rw-r--r--mesalib/src/mesa/program/prog_optimize.c6
-rw-r--r--mesalib/src/mesa/program/prog_parameter.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/mesalib/src/mesa/program/prog_instruction.c b/mesalib/src/mesa/program/prog_instruction.c
index dcfedb77b..dc0a5109f 100644
--- a/mesalib/src/mesa/program/prog_instruction.c
+++ b/mesalib/src/mesa/program/prog_instruction.c
@@ -70,7 +70,7 @@ struct prog_instruction *
_mesa_alloc_instructions(GLuint numInst)
{
return
- calloc(1, numInst * sizeof(struct prog_instruction));
+ calloc(numInst, sizeof(struct prog_instruction));
}
diff --git a/mesalib/src/mesa/program/prog_optimize.c b/mesalib/src/mesa/program/prog_optimize.c
index 6153f5e2c..08c1c3046 100644
--- a/mesalib/src/mesa/program/prog_optimize.c
+++ b/mesalib/src/mesa/program/prog_optimize.c
@@ -260,7 +260,7 @@ _mesa_remove_dead_code_global(struct gl_program *prog)
}
removeInst =
- calloc(1, prog->NumInstructions * sizeof(GLboolean));
+ calloc(prog->NumInstructions, sizeof(GLboolean));
/* Determine which temps are read and written */
for (i = 0; i < prog->NumInstructions; i++) {
@@ -602,7 +602,7 @@ _mesa_remove_dead_code_local(struct gl_program *prog)
GLuint i, arg, rem = 0;
removeInst =
- calloc(1, prog->NumInstructions * sizeof(GLboolean));
+ calloc(prog->NumInstructions, sizeof(GLboolean));
for (i = 0; i < prog->NumInstructions; i++) {
const struct prog_instruction *inst = prog->Instructions + i;
@@ -743,7 +743,7 @@ _mesa_remove_extra_moves(struct gl_program *prog)
}
removeInst =
- calloc(1, prog->NumInstructions * sizeof(GLboolean));
+ calloc(prog->NumInstructions, sizeof(GLboolean));
/*
* Look for sequences such as this:
diff --git a/mesalib/src/mesa/program/prog_parameter.c b/mesalib/src/mesa/program/prog_parameter.c
index 54531d255..f43deba0b 100644
--- a/mesalib/src/mesa/program/prog_parameter.c
+++ b/mesalib/src/mesa/program/prog_parameter.c
@@ -54,7 +54,7 @@ _mesa_new_parameter_list_sized(unsigned size)
/* alloc arrays */
p->Parameters = (struct gl_program_parameter *)
- calloc(1, size * sizeof(struct gl_program_parameter));
+ calloc(size, sizeof(struct gl_program_parameter));
p->ParameterValues = (gl_constant_value (*)[4])
_mesa_align_malloc(size * 4 *sizeof(gl_constant_value), 16);