diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-09 11:10:00 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-03-09 11:10:00 +0100 |
commit | 90c5766caf16e35cb871116a4655a106a3c272dc (patch) | |
tree | ddc2ea976240a3f8f9c3294b41492256e6eb3f82 /tools/bitmap_to_c.c | |
parent | 5cb99e12c6817592f49ca153a3081dd6b5995cf2 (diff) | |
download | spice-90c5766caf16e35cb871116a4655a106a3c272dc.tar.gz spice-90c5766caf16e35cb871116a4655a106a3c272dc.tar.xz spice-90c5766caf16e35cb871116a4655a106a3c272dc.zip |
Use macros from <spice/macros.h> rather than duplicate them
Diffstat (limited to 'tools/bitmap_to_c.c')
-rw-r--r-- | tools/bitmap_to_c.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/bitmap_to_c.c b/tools/bitmap_to_c.c index e9cd4db2..c4e1df10 100644 --- a/tools/bitmap_to_c.c +++ b/tools/bitmap_to_c.c @@ -24,12 +24,9 @@ #include <stdio.h> #include <stdlib.h> #include <getopt.h> +#include <spice/macros.h> -#define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1)) -#define TRUE 1 -#define FALSE 0 - #define TAB " " #define ERROR(str) printf("%s: error: %s\n", prog_name, str); exit(-1); @@ -143,7 +140,7 @@ static Pixmap *init_bitmap(size_t input_size, uint8_t *buf) if (file_header->header.bpp == 32) { stride = file_header->header.width * sizeof(uint32_t); } else if (file_header->header.bpp == 24) { - stride = ALIGN(file_header->header.width * 3, 4); + stride = SPICE_ALIGN(file_header->header.width * 3, 4); } else { ERROR("unsupported bpp"); return NULL; |