diff options
author | Daniel Stone <[email protected]> | 2017-03-23 15:09:49 +0000 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2017-03-23 15:28:41 +0000 |
commit | 378025ca8b82c5f2068e202f1016450d97820d99 (patch) | |
tree | 68d6a29e15d455bfa3f8dcb14b883b31f8273cd9 /src/gbm/main/gbmint.h | |
parent | ec0313fd58fa1a64ec5ff7176e9fe0475f034d8c (diff) |
gbm: Use unsigned for BO offset getter
The actual offset returned is uint32_t, however int64_t was used as the
return type from gbm_bo_get_offset to allow negative returns to signal
errors to the caller.
In case of an error getting the offset, the user will also be unable to
get the handle/FD, and thus have nothing to offset into. This means that
returning 0 as an error value is harmless, allowing us to change the
return type to uint32_t in order to avoid signed/unsigned confusion in
callers.
Signed-off-by: Daniel Stone <[email protected]>
Cc: Ben Widawsky <[email protected]>
Cc: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gbm/main/gbmint.h')
-rw-r--r-- | src/gbm/main/gbmint.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gbm/main/gbmint.h b/src/gbm/main/gbmint.h index 5ad85cc80ff..c27a7a560ae 100644 --- a/src/gbm/main/gbmint.h +++ b/src/gbm/main/gbmint.h @@ -81,7 +81,7 @@ struct gbm_device { int (*bo_get_planes)(struct gbm_bo *bo); union gbm_bo_handle (*bo_get_handle)(struct gbm_bo *bo, int plane); uint32_t (*bo_get_stride)(struct gbm_bo *bo, int plane); - int64_t (*bo_get_offset)(struct gbm_bo *bo, int plane); + uint32_t (*bo_get_offset)(struct gbm_bo *bo, int plane); uint64_t (*bo_get_modifier)(struct gbm_bo *bo); void (*bo_destroy)(struct gbm_bo *bo); |