diff options
author | Chris Michael <cp.michael@samsung.com> | 2019-11-14 12:21:40 -0500 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2019-11-14 12:21:40 -0500 |
commit | 2288c92bc5422c1a5df5fa4f6aabc2307a297e9d (patch) | |
tree | e9daed1127a606f9bf7e6a33982197e109097b22 /src/lib/ecore_drm2/ecore_drm2_outputs.c | |
parent | 9ca573f40f1065cc717c0c5aabb787671bab852b (diff) |
ecore-drm2: Fix issue of shifting 1 by more than 32bits
Based on 9ca573f40f1065cc717c0c5aabb787671bab852b, this patch fixes
potential undefined behaviour on 64 bit systems.
@fix
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_outputs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index dfb2fa93d1..6fe3eb5770 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c | |||
@@ -659,7 +659,7 @@ _output_plane_states_get(Ecore_Drm2_Atomic_State *state, unsigned int crtc_id, i | |||
659 | states = | 659 | states = |
660 | eina_list_append(states, _atomic_state_plane_duplicate(pstate)); | 660 | eina_list_append(states, _atomic_state_plane_duplicate(pstate)); |
661 | } | 661 | } |
662 | else if (pstate->mask & (1 << index)) | 662 | else if (pstate->mask & (1ULL << index)) |
663 | { | 663 | { |
664 | states = | 664 | states = |
665 | eina_list_append(states, _atomic_state_plane_duplicate(pstate)); | 665 | eina_list_append(states, _atomic_state_plane_duplicate(pstate)); |
@@ -1454,7 +1454,7 @@ ecore_drm2_output_possible_crtc_get(Ecore_Drm2_Output *output, unsigned int crtc | |||
1454 | { | 1454 | { |
1455 | if (res->crtcs[k] != output->crtc_id) continue; | 1455 | if (res->crtcs[k] != output->crtc_id) continue; |
1456 | 1456 | ||
1457 | if (p & (1 << k)) | 1457 | if (p & (1ULL << k)) |
1458 | { | 1458 | { |
1459 | ret = EINA_TRUE; | 1459 | ret = EINA_TRUE; |
1460 | break; | 1460 | break; |