From 378025ca8b82c5f2068e202f1016450d97820d99 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 23 Mar 2017 15:09:49 +0000 Subject: 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 Cc: Ben Widawsky Cc: Jason Ekstrand --- src/gbm/main/gbm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gbm/main/gbm.h') diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index a774b509510..b52137ed01d 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -315,7 +315,7 @@ gbm_bo_get_stride_for_plane(struct gbm_bo *bo, int plane); uint32_t gbm_bo_get_format(struct gbm_bo *bo); -int64_t +uint32_t gbm_bo_get_offset(struct gbm_bo *bo, int plane); struct gbm_device * -- cgit v1.2.3