quartz: Fix ALIGN macros

Chris Robinson chris.kcat at gmail.com
Sat Apr 7 11:37:55 CDT 2007


-------------- next part --------------
From 6202517b84e31d5193eb85c46c51dd21baa57a14 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat at gmail.com>
Date: Sat, 7 Apr 2007 07:05:33 -0700
Subject: [PATCH] quartz: Fix ALIGN macros

---
 dlls/quartz/pin.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index 48cedfc..b7d9a52 100644
--- a/dlls/quartz/pin.c
+++ b/dlls/quartz/pin.c
@@ -34,8 +34,8 @@ static const IPinVtbl OutputPin_Vtbl;
 static const IMemInputPinVtbl MemInputPin_Vtbl;
 static const IPinVtbl PullPin_Vtbl;
 
-#define ALIGNDOWN(value,boundary) ((value) & ~(boundary-1))
-#define ALIGNUP(value,boundary) (ALIGNDOWN(value - 1, boundary) + boundary)
+#define ALIGNDOWN(value,boundary) ((value)/(boundary)*(boundary))
+#define ALIGNUP(value,boundary) (ALIGNDOWN((value)+(boundary)-1, (boundary)))
 
 static inline InputPin *impl_from_IMemInputPin( IMemInputPin *iface )
 {
-- 
1.4.4.4



More information about the wine-patches mailing list