diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-20 09:32:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-20 10:11:58 +0000 |
commit | 60792b45dd5038d570c7880b7e86b666424f765d (patch) | |
tree | d610070881bd17d96479e16ec0188d9e9a13a3ab /desktop/unx | |
parent | b29069d16386d5241b46280d2c67f3a1819f9c4b (diff) |
const these up
Change-Id: Ide19ec6a04a591327effe6d3c4da5db62e58b4c9
Diffstat (limited to 'desktop/unx')
-rw-r--r-- | desktop/unx/source/splashx.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 43b178bc2e4b..454755b55ae7 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -229,28 +229,28 @@ static void create_pixmap(struct splash* splash) if ( splash->visual->class == TrueColor ) { - unsigned long red_mask = splash->visual->red_mask; - unsigned long green_mask = splash->visual->green_mask; - unsigned long blue_mask = splash->visual->blue_mask; + const unsigned long red_mask = splash->visual->red_mask; + const unsigned long green_mask = splash->visual->green_mask; + const unsigned long blue_mask = splash->visual->blue_mask; - unsigned long red_delta_mask = ( 1UL << ( 8 - BITS( red_mask ) ) ) - 1; - unsigned long green_delta_mask = ( 1UL << ( 8 - BITS( green_mask ) ) ) - 1; - unsigned long blue_delta_mask = ( 1UL << ( 8 - BITS( blue_mask ) ) ) - 1; + const unsigned long red_delta_mask = ( 1UL << ( 8 - BITS( red_mask ) ) ) - 1; + const unsigned long green_delta_mask = ( 1UL << ( 8 - BITS( green_mask ) ) ) - 1; + const unsigned long blue_delta_mask = ( 1UL << ( 8 - BITS( blue_mask ) ) ) - 1; - int red_shift = HIGHEST_BIT( red_mask ) - 8; - int green_shift = HIGHEST_BIT( green_mask ) - 8; - int blue_shift = HIGHEST_BIT( blue_mask ) - 8; + const int red_shift = HIGHEST_BIT( red_mask ) - 8; + const int green_shift = HIGHEST_BIT( green_mask ) - 8; + const int blue_shift = HIGHEST_BIT( blue_mask ) - 8; XImage* image = XCreateImage( splash->display, splash->visual, splash->depth, ZPixmap, 0, NULL, splash->width, splash->height, 32, 0 ); - int bytes_per_line = image->bytes_per_line; - int bpp = image->bits_per_pixel; - int byte_order = image->byte_order; + const int bytes_per_line = image->bytes_per_line; + const int bpp = image->bits_per_pixel; + const int byte_order = image->byte_order; #if defined OSL_LITENDIAN - int machine_byte_order = LSBFirst; + const int machine_byte_order = LSBFirst; #else /* OSL_BIGENDIAN */ - int machine_byte_order = MSBFirst; + const int machine_byte_order = MSBFirst; #endif char *data = malloc( splash->height * bytes_per_line ); |