mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: use UINT64_C for uint64_t literals
Prevents an integer promotion bug during the byte-shift.
This commit is contained in:
		
							parent
							
								
									68b4a5305e
								
							
						
					
					
						commit
						39c5d93dea
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
#include <GLES2/gl2.h>
 | 
			
		||||
#include <GLES2/gl2ext.h>
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -1427,7 +1428,7 @@ int handle_drm_event(int fd, uint32_t mask, void *data) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void restore_drm_outputs(struct wlr_drm_backend *drm) {
 | 
			
		||||
	uint64_t to_close = (1L << wl_list_length(&drm->outputs)) - 1;
 | 
			
		||||
	uint64_t to_close = (UINT64_C(1) << wl_list_length(&drm->outputs)) - 1;
 | 
			
		||||
 | 
			
		||||
	struct wlr_drm_connector *conn;
 | 
			
		||||
	wl_list_for_each(conn, &drm->outputs, link) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1444,7 +1445,7 @@ void restore_drm_outputs(struct wlr_drm_backend *drm) {
 | 
			
		|||
		struct wlr_drm_connector *conn;
 | 
			
		||||
		wl_list_for_each(conn, &drm->outputs, link) {
 | 
			
		||||
			if (conn->state != WLR_DRM_CONN_CLEANUP || !conn->pageflip_pending) {
 | 
			
		||||
				to_close &= ~(1 << i);
 | 
			
		||||
				to_close &= ~(UINT64_C(1) << i);
 | 
			
		||||
			}
 | 
			
		||||
			i++;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue