mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-16 20:38:16 +00:00
[client] use variable-relative sizeof where possible
This commit is contained in:

committed by
Geoffrey McRae

parent
1c5620ba25
commit
14ad83c6b8
@@ -25,7 +25,7 @@
|
||||
void egl_drawTorus(EGL_Model * model, unsigned int pts, float x, float y,
|
||||
float inner, float outer)
|
||||
{
|
||||
GLfloat * v = (GLfloat *)malloc(sizeof(GLfloat) * (pts + 1) * 6);
|
||||
GLfloat * v = (GLfloat *)malloc(sizeof(*v) * (pts + 1) * 6);
|
||||
GLfloat * dst = v;
|
||||
|
||||
for(unsigned int i = 0; i <= pts; ++i)
|
||||
@@ -48,7 +48,7 @@ void egl_drawTorus(EGL_Model * model, unsigned int pts, float x, float y,
|
||||
void egl_drawTorusArc(EGL_Model * model, unsigned int pts, float x, float y,
|
||||
float inner, float outer, float s, float e)
|
||||
{
|
||||
GLfloat * v = (GLfloat *)malloc(sizeof(GLfloat) * (pts + 1) * 6);
|
||||
GLfloat * v = (GLfloat *)malloc(sizeof(*v) * (pts + 1) * 6);
|
||||
GLfloat * dst = v;
|
||||
|
||||
for(unsigned int i = 0; i <= pts; ++i)
|
||||
|
Reference in New Issue
Block a user