[MPlayer-dev-eng] [PATCH 8/9] Use proper ifdef/ifndef when checking defines

Hans-Christian Egtvedt hans-christian.egtvedt at atmel.com
Mon Feb 16 17:16:57 CET 2009


Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt at atmel.com>
---
 libavcodec/bitstream.h   |    4 ++--
 libavcodec/dsputil.c     |    2 +-
 libavcodec/h264.c        |    2 +-
 libavutil/intreadwrite.h |    2 +-
 libavutil/timer.h        |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index f2095be..905e5de 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -199,7 +199,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
 #ifdef BITSTREAM_WRITER_LE
     bit_buf |= value << (32 - bit_left);
     if (n >= bit_left) {
-#if !HAVE_FAST_UNALIGNED
+#ifndef HAVE_FAST_UNALIGNED
         if (3 & (intptr_t) s->buf_ptr) {
             AV_WL32(s->buf_ptr, bit_buf);
         } else
@@ -217,7 +217,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
     } else {
         bit_buf<<=bit_left;
         bit_buf |= value >> (n - bit_left);
-#if !HAVE_FAST_UNALIGNED
+#ifndef HAVE_FAST_UNALIGNED
         if (3 & (intptr_t) s->buf_ptr) {
             AV_WB32(s->buf_ptr, bit_buf);
         } else
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 30418bf..ae8f441 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -3519,7 +3519,7 @@ static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
 
 static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
     long i;
-#if !HAVE_FAST_UNALIGNED
+#ifndef HAVE_FAST_UNALIGNED
     if((long)src2 & (sizeof(long)-1)){
         for(i=0; i+7<w; i+=8){
             dst[i+0] = src1[i+0]-src2[i+0];
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 133b918..9dbbc47 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1381,7 +1381,7 @@ static const uint8_t *decode_nal(H264Context *h, const uint8_t *src, int *dst_le
         printf("%2X ", src[i]);
 #endif
 
-#if HAVE_FAST_UNALIGNED
+#ifdef HAVE_FAST_UNALIGNED
 # if HAVE_FAST_64BIT
 #   define RS 7
     for(i=0; i+1<length; i+=9){
diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
index 7c5909e..535fdd2 100644
--- a/libavutil/intreadwrite.h
+++ b/libavutil/intreadwrite.h
@@ -66,7 +66,7 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
 #define AV_RL8(x)     AV_RB8(x)
 #define AV_WL8(p, d)  AV_WB8(p, d)
 
-#if HAVE_FAST_UNALIGNED
+#ifdef HAVE_FAST_UNALIGNED
 # ifdef WORDS_BIGENDIAN
 #  define AV_RB16(x)    AV_RN16(x)
 #  define AV_WB16(p, d) AV_WN16(p, d)
diff --git a/libavutil/timer.h b/libavutil/timer.h
index 709e12f..bd359a7 100644
--- a/libavutil/timer.h
+++ b/libavutil/timer.h
@@ -71,7 +71,7 @@ static inline uint64_t read_time(void)
      return (((uint64_t)tbu)<<32) | (uint64_t)tbl;
 }
 #endif
-#elif HAVE_GETHRTIME
+#elif defined(HAVE_GETHRTIME)
 #define AV_READ_TIME gethrtime
 #endif
 
-- 
1.5.6.3




More information about the MPlayer-dev-eng mailing list