[gimp] file-bmp: Use cleaner serialization (sign)



commit bcf16161e60ed9e3caac9dda891257abf0ada94c
Author: Mukund Sivaraman <muks banu com>
Date:   Fri Oct 3 11:58:42 2014 +0530

    file-bmp: Use cleaner serialization (sign)

 plug-ins/file-bmp/bmp-write.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c
index 500ad93..562a70b 100644
--- a/plug-ins/file-bmp/bmp-write.c
+++ b/plug-ins/file-bmp/bmp-write.c
@@ -83,18 +83,18 @@ static void
 FromL (gint32  wert,
        guchar *bopuffer)
 {
-  bopuffer[0] = (wert & 0x000000ff)>>0x00;
-  bopuffer[1] = (wert & 0x0000ff00)>>0x08;
-  bopuffer[2] = (wert & 0x00ff0000)>>0x10;
-  bopuffer[3] = (wert & 0xff000000)>>0x18;
+  bopuffer[0] = (wert)         & 0xff;
+  bopuffer[1] = (wert >> 0x08) & 0xff;
+  bopuffer[2] = (wert >> 0x10) & 0xff;
+  bopuffer[3] = (wert >> 0x18) & 0xff;
 }
 
 static void
 FromS (gint16  wert,
        guchar *bopuffer)
 {
-  bopuffer[0] = (wert & 0x00ff)>>0x00;
-  bopuffer[1] = (wert & 0xff00)>>0x08;
+  bopuffer[0] = (wert)         & 0xff;
+  bopuffer[1] = (wert >> 0x08) & 0xff;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]