diff options
author | Eric Anholt <[email protected]> | 2004-09-30 00:40:21 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2004-09-30 00:40:21 +0000 |
commit | 6a2ca962db23f6affb4b93458211849db5a73044 (patch) | |
tree | e6ec3d7e9fcc6d908d690aa6699e08c5b79ebbd1 | |
parent | 7a086dc05e665a78f7e9d069aa4fc70e844b8988 (diff) |
Bugzilla #1058: Fix some potential 64bit pointer issues by storing differences
between pointers in appropriate types.
Submitted by: Ronny V. Vindenes <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c index d2fde39a1cd..74cc40adcd5 100644 --- a/src/mesa/drivers/dri/r200/r200_ioctl.c +++ b/src/mesa/drivers/dri/r200/r200_ioctl.c @@ -860,7 +860,7 @@ void r200FreeMemoryMESA(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer) { GET_CURRENT_CONTEXT(ctx); r200ContextPtr rmesa; - int region_offset; + ptrdiff_t region_offset; drm_radeon_mem_free_t memfree; int ret; @@ -921,7 +921,7 @@ GLuint r200GetMemoryOffsetMESA(__DRInativeDisplay *dpy, int scrn, const GLvoid * GLboolean r200IsGartMemory( r200ContextPtr rmesa, const GLvoid *pointer, GLint size ) { - int offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map; + ptrdiff_t offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map; int valid = (size >= 0 && offset >= 0 && offset + size < rmesa->r200Screen->gartTextures.size); @@ -935,7 +935,7 @@ GLboolean r200IsGartMemory( r200ContextPtr rmesa, const GLvoid *pointer, GLuint r200GartOffsetFromVirtual( r200ContextPtr rmesa, const GLvoid *pointer ) { - int offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map; + ptrdiff_t offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map; if (offset < 0 || offset > rmesa->r200Screen->gartTextures.size) return ~0; |