i830: Fix stack corruption
authorChad Versace <chad.versace@linux.intel.com>
Fri, 20 Jul 2012 22:41:27 +0000 (15:41 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Fri, 20 Jul 2012 23:01:57 +0000 (16:01 -0700)
commit735070c45b403a9631415b09e9fd519f601f0229
tree3fe0dde0e14b103ebd77d9a5ab8a3cdc89348fd8
parent1a8f6ac5a46dfbb8287ee2bacdd11c3a1a3a65c7
i830: Fix stack corruption

Found by compiler warning:
    i830_texstate.c:131:28: warning: argument to 'sizeof' in 'memset' call
          is the same expression as the destination; did you mean to
          dereference it?  [-Wsizeof-pointer-memaccess]
       memset(state, 0, sizeof(state));
              ~~~~~            ^~~~~

On 64-bit systems, memset here would write an extra 4 bytes.

Note: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i915/i830_texstate.c