uint*t -> u_int*t changes
[mesa.git] / src / mesa / main / colortab.c
index 3fdab6a27db69b1ea319f8c5fc4f94d77f123761..4eafe3e899fcfecba3f804169d06e2fca5809984 100644 (file)
@@ -195,7 +195,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
    if (ctx->Unpack.BufferObj->Name) {
       /* Get/unpack the color table data from a PBO */
       GLubyte *buf;
-      if (!_mesa_validate_pbo_access(&ctx->Unpack, count, 1, 1,
+      if (!_mesa_validate_pbo_access(1, &ctx->Unpack, count, 1, 1,
                                      format, type, data)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "glColor[Sub]Table(bad PBO access)");
@@ -543,7 +543,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
    struct gl_color_table *table = NULL;
    GLfloat rScale = 1.0, gScale = 1.0, bScale = 1.0, aScale = 1.0;
    GLfloat rBias  = 0.0, gBias  = 0.0, bBias  = 0.0, aBias  = 0.0;
-   GLint comps;
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
    switch (target) {
@@ -636,8 +635,8 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
       return;
    }
 
-   comps = _mesa_components_in_format(table->Format);
-   assert(comps > 0);  /* error should have been caught sooner */
+   /* error should have been caught sooner */
+   assert(_mesa_components_in_format(table->Format) > 0);
 
    if (start + count > (GLint) table->Size) {
       _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
@@ -891,7 +890,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
    if (ctx->Pack.BufferObj->Name) {
       /* pack color table into PBO */
       GLubyte *buf;
-      if (!_mesa_validate_pbo_access(&ctx->Pack, table->Size, 1, 1,
+      if (!_mesa_validate_pbo_access(1, &ctx->Pack, table->Size, 1, 1,
                                      format, type, data)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "glGetColorTable(invalid PBO access)");